Reference internal pages as absolute URLs for Chromium compatibility.

This commit is contained in:
hackademix 2019-04-29 09:43:14 +02:00
parent 225ce1e6c8
commit 0c2df08d78
2 changed files with 7 additions and 3 deletions

View File

@ -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) {

View File

@ -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;