Replace deprecated extension.getURL() with runtime.getURL().

This commit is contained in:
hackademix 2021-06-19 00:28:44 +02:00
parent eb9f53e2b8
commit 984e68e3cf
5 changed files with 6 additions and 6 deletions

View File

@ -221,7 +221,7 @@ var Settings = {
async reloadOptionsUI() {
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.tabs.reload(t.id);

View File

@ -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 ctxMenuId = "noscript-ctx-menu";

@ -1 +1 @@
Subproject commit 8eee9f97d98b7622b3f7ee018e87701b9d6d7825
Subproject commit d55eab823474e56b3da2e84203a1c6a0f7515ebf

View File

@ -29,7 +29,7 @@ var Prompts = (() => {
this.close();
let {width, height} = data.features;
let options = {
url: browser.extension.getURL("ui/prompt.html"),
url: browser.runtime.getURL("ui/prompt.html"),
type: "panel",
width,
height,

View File

@ -97,7 +97,7 @@ addEventListener("unload", e => {
let handlers = {
"options": e => {
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 {
browser.runtime.openOptionsPage();
}
@ -255,7 +255,7 @@ addEventListener("unload", e => {
pendingReload(sitesUI.anyPermissionsChanged());
if (optionsClosed) return;
browser.tabs.query({
url: browser.extension.getURL(
url: browser.runtime.getURL(
browser.runtime.getManifest().options_ui.page)
}).then(tabs => {
browser.tabs.remove(tabs.map(t => t.id));