Replace deprecated extension.getURL() with runtime.getURL().
This commit is contained in:
parent
eb9f53e2b8
commit
984e68e3cf
|
@ -221,7 +221,7 @@ var Settings = {
|
||||||
|
|
||||||
async reloadOptionsUI() {
|
async reloadOptionsUI() {
|
||||||
try {
|
try {
|
||||||
for (let t of await browser.tabs.query({url: browser.extension.getURL(
|
for (let t of await browser.tabs.query({url: browser.runtime.getURL(
|
||||||
browser.runtime.getManifest().options_ui.page) })
|
browser.runtime.getManifest().options_ui.page) })
|
||||||
) {
|
) {
|
||||||
browser.tabs.reload(t.id);
|
browser.tabs.reload(t.id);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let popupURL = browser.extension.getURL("/ui/popup.html");
|
let popupURL = browser.runtime.getURL("/ui/popup.html");
|
||||||
let popupFor = tabId => `${popupURL}#tab${tabId}`;
|
let popupFor = tabId => `${popupURL}#tab${tabId}`;
|
||||||
|
|
||||||
let ctxMenuId = "noscript-ctx-menu";
|
let ctxMenuId = "noscript-ctx-menu";
|
||||||
|
|
2
src/nscl
2
src/nscl
|
@ -1 +1 @@
|
||||||
Subproject commit 8eee9f97d98b7622b3f7ee018e87701b9d6d7825
|
Subproject commit d55eab823474e56b3da2e84203a1c6a0f7515ebf
|
|
@ -29,7 +29,7 @@ var Prompts = (() => {
|
||||||
this.close();
|
this.close();
|
||||||
let {width, height} = data.features;
|
let {width, height} = data.features;
|
||||||
let options = {
|
let options = {
|
||||||
url: browser.extension.getURL("ui/prompt.html"),
|
url: browser.runtime.getURL("ui/prompt.html"),
|
||||||
type: "panel",
|
type: "panel",
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
|
|
|
@ -97,7 +97,7 @@ addEventListener("unload", e => {
|
||||||
let handlers = {
|
let handlers = {
|
||||||
"options": e => {
|
"options": e => {
|
||||||
if (UA.mobile) { // Fenix fails on openOptionsPage
|
if (UA.mobile) { // Fenix fails on openOptionsPage
|
||||||
browser.tabs.create({url: browser.extension.getURL("/ui/options.html")});
|
browser.tabs.create({url: browser.runtime.getURL("/ui/options.html")});
|
||||||
} else {
|
} else {
|
||||||
browser.runtime.openOptionsPage();
|
browser.runtime.openOptionsPage();
|
||||||
}
|
}
|
||||||
|
@ -255,7 +255,7 @@ addEventListener("unload", e => {
|
||||||
pendingReload(sitesUI.anyPermissionsChanged());
|
pendingReload(sitesUI.anyPermissionsChanged());
|
||||||
if (optionsClosed) return;
|
if (optionsClosed) return;
|
||||||
browser.tabs.query({
|
browser.tabs.query({
|
||||||
url: browser.extension.getURL(
|
url: browser.runtime.getURL(
|
||||||
browser.runtime.getManifest().options_ui.page)
|
browser.runtime.getManifest().options_ui.page)
|
||||||
}).then(tabs => {
|
}).then(tabs => {
|
||||||
browser.tabs.remove(tabs.map(t => t.id));
|
browser.tabs.remove(tabs.map(t => t.id));
|
||||||
|
|
Loading…
Reference in New Issue