Reference internal pages as absolute URLs for Chromium compatibility.
This commit is contained in:
parent
225ce1e6c8
commit
0c2df08d78
|
@ -180,7 +180,9 @@ var Settings = {
|
||||||
|
|
||||||
async reloadOptionsUI() {
|
async reloadOptionsUI() {
|
||||||
try {
|
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);
|
browser.tabs.reload(t.id);
|
||||||
};
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -166,8 +166,10 @@ addEventListener("unload", e => {
|
||||||
sitesUI.onChange = (row) => {
|
sitesUI.onChange = (row) => {
|
||||||
pendingReload(!row.temp2perm);
|
pendingReload(!row.temp2perm);
|
||||||
if (optionsClosed) return;
|
if (optionsClosed) return;
|
||||||
browser.tabs.query({url: browser.runtime.getManifest().options_ui.page })
|
browser.tabs.query({
|
||||||
.then(tabs => {
|
url: browser.extension.getURL(
|
||||||
|
browser.runtime.getManifest().options_ui.page)
|
||||||
|
}).then(tabs => {
|
||||||
browser.tabs.remove(tabs.map(t => t.id));
|
browser.tabs.remove(tabs.map(t => t.id));
|
||||||
});
|
});
|
||||||
optionsClosed = true;
|
optionsClosed = true;
|
||||||
|
|
Loading…
Reference in New Issue