diff --git a/extension/extension-mpris.js b/extension/extension-mpris.js --- a/extension/extension-mpris.js +++ b/extension/extension-mpris.js @@ -136,10 +136,11 @@ // callbacks from a browser tab to our extension addRuntimeCallback("mpris", "playing", function (message, sender) { - // Before Firefox 67 it ran extensions in incognito mode by default - // so we disable media controls for them to prevent accidental private + // Before Firefox 67 it ran extensions in incognito mode by default. + // However, after the update the extension keeps running in incognito mode. + // So we keep disabling media controls for them to prevent accidental private // information leak on lock screen or now playing auto status in a messenger - if (!isNaN(firefoxVersion) && firefoxVersion < 67 && sender.tab.incognito) { + if (IS_FIREFOX && sender.tab.incognito) { return; } diff --git a/extension/extension-tabsrunner.js b/extension/extension-tabsrunner.js --- a/extension/extension-tabsrunner.js +++ b/extension/extension-tabsrunner.js @@ -50,8 +50,9 @@ // remove incognito tabs and properties not in whitelist var filteredTabs = tabs; - // Firefox before 67 runs extensions in incognito by default, so exclude those tabs for it - if (!isNaN(firefoxVersion) && firefoxVersion < 67) { + // Firefox before 67 runs extensions in incognito by default + // but we keep running after an update, so exclude those tabs for it + if (IS_FIREFOX) { filteredTabs = filteredTabs.filter(function (tab) { return !tab.incognito; }); diff --git a/extension/extension-utils.js b/extension/extension-utils.js --- a/extension/extension-utils.js +++ b/extension/extension-utils.js @@ -25,9 +25,6 @@ var storage = (IS_FIREFOX ? chrome.storage.local : chrome.storage.sync); -let firefoxVersionMatch = navigator.userAgent.match(/Firefox\/(\d+)/) -let firefoxVersion = firefoxVersionMatch ? Number(firefoxVersionMatch[1]) : NaN - // Callback is called with following arguments (in that order); // - The actual message data/payload // - The name of the action triggered