Changeset View
Changeset View
Standalone View
Standalone View
extension/extension-tabsrunner.js
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
45 | 45 | | |||
46 | // FIXME We really should enforce some kind of security policy, so only e.g. plasmashell and krunner | 46 | // FIXME We really should enforce some kind of security policy, so only e.g. plasmashell and krunner | ||
47 | // may access your tabs | 47 | // may access your tabs | ||
48 | addCallback("tabsrunner", "getTabs", function (message) { | 48 | addCallback("tabsrunner", "getTabs", function (message) { | ||
49 | chrome.tabs.query({}, function (tabs) { | 49 | chrome.tabs.query({}, function (tabs) { | ||
50 | // remove incognito tabs and properties not in whitelist | 50 | // remove incognito tabs and properties not in whitelist | ||
51 | var filteredTabs = tabs; | 51 | var filteredTabs = tabs; | ||
52 | 52 | | |||
53 | // Firefox before 67 runs extensions in incognito by default, so exclude those tabs for it | 53 | // Firefox before 67 runs extensions in incognito by default | ||
54 | if (!isNaN(firefoxVersion) && firefoxVersion < 67) { | 54 | // but we keep running after an update, so exclude those tabs for it | ||
55 | if (IS_FIREFOX) { | ||||
55 | filteredTabs = filteredTabs.filter(function (tab) { | 56 | filteredTabs = filteredTabs.filter(function (tab) { | ||
56 | return !tab.incognito; | 57 | return !tab.incognito; | ||
57 | }); | 58 | }); | ||
58 | } | 59 | } | ||
59 | 60 | | |||
60 | var filteredTabs = filterArrayObjects(filteredTabs, whitelistedTabProperties); | 61 | var filteredTabs = filterArrayObjects(filteredTabs, whitelistedTabProperties); | ||
61 | 62 | | |||
62 | // Shared between the callbacks | 63 | // Shared between the callbacks | ||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |