summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhackademix2019-04-29 09:43:14 +0200
committerhackademix2019-04-29 09:43:14 +0200
commit0c2df08d783549f74801e060d5656f9f1f7f22ac (patch)
treefb1c79d56eb1f77168f1c1fa51a1d34a8757814d
parent225ce1e6c8bad3704bb00ec24011362de8a54080 (diff)
downloadnoscript-0c2df08d783549f74801e060d5656f9f1f7f22ac.tar.gz
noscript-0c2df08d783549f74801e060d5656f9f1f7f22ac.tar.xz
noscript-0c2df08d783549f74801e060d5656f9f1f7f22ac.zip
Reference internal pages as absolute URLs for Chromium compatibility.
-rw-r--r--src/bg/Settings.js4
-rw-r--r--src/ui/popup.js6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/bg/Settings.js b/src/bg/Settings.js
index 28f880e..4fa83d0 100644
--- a/src/bg/Settings.js
+++ b/src/bg/Settings.js
@@ -180,7 +180,9 @@ var Settings = {
async reloadOptionsUI() {
try {
- for (let t of await browser.tabs.query({url: browser.runtime.getManifest().options_ui.page })) {
+ for (let t of await browser.tabs.query({url: browser.extension.getURL(
+ browser.runtime.getManifest().options_ui.page) })
+ ) {
browser.tabs.reload(t.id);
};
} catch (e) {
diff --git a/src/ui/popup.js b/src/ui/popup.js
index 87ac73e..310ecac 100644
--- a/src/ui/popup.js
+++ b/src/ui/popup.js
@@ -166,8 +166,10 @@ addEventListener("unload", e => {
sitesUI.onChange = (row) => {
pendingReload(!row.temp2perm);
if (optionsClosed) return;
- browser.tabs.query({url: browser.runtime.getManifest().options_ui.page })
- .then(tabs => {
+ browser.tabs.query({
+ url: browser.extension.getURL(
+ browser.runtime.getManifest().options_ui.page)
+ }).then(tabs => {
browser.tabs.remove(tabs.map(t => t.id));
});
optionsClosed = true;