Index: lib/options.js |
=================================================================== |
--- a/lib/options.js |
+++ b/lib/options.js |
@@ -22,7 +22,9 @@ |
const {checkWhitelisted} = require("./whitelisting"); |
const info = require("../buildtools/info"); |
-const optionsUrl = "options.html"; |
+const manifest = browser.runtime.getManifest(); |
+const optionsUrl = manifest.options_page || manifest.options_ui.page; |
kzar
2018/05/15 13:32:31
I trust you got it right, but i wonder where manif
Sebastian Noack
2018/05/15 14:17:15
That is correct, but there is also Microsoft Edge
|
+const popupUrl = manifest.browser_action.default_popup; |
kzar
2018/05/15 13:32:31
I don't see this one for gecko.
Sebastian Noack
2018/05/15 14:17:15
Argh, right. We removed the popup URL from the man
|
function findOptionsTab(callback) |
{ |
@@ -187,12 +189,12 @@ |
browser.runtime.getBrowserInfo().then(browserInfo => |
{ |
if (browserInfo.name != "Fennec") |
- browser.browserAction.setPopup({popup: "popup.html"}); |
+ browser.browserAction.setPopup({popup: popupUrl}); |
}); |
} |
else |
{ |
- browser.browserAction.setPopup({popup: "popup.html"}); |
+ browser.browserAction.setPopup({popup: popupUrl}); |
} |
// On Firefox for Android, open the options page directly when the browser |