Merge pull request #2052 from cammarin/runtime-geturl

Replace deprecated method `browser.extension.getURL()`
This commit is contained in:
luke crouch 2021-07-26 09:09:17 -05:00 committed by GitHub
commit 081ea0bedb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -698,7 +698,7 @@ window.assignManager = {
reloadPageInContainer(url, currentUserContextId, userContextId, index, active, neverAsk = false, openerTabId = null) {
const cookieStoreId = backgroundLogic.cookieStoreId(userContextId);
const loadPage = browser.extension.getURL("confirm-page.html");
const loadPage = browser.runtime.getURL("confirm-page.html");
// False represents assignment is not permitted
// If the user has explicitly checked "Never Ask Again" on the warning page we will send them straight there
if (neverAsk) {

View file

@ -22,7 +22,7 @@ const backgroundLogic = {
},
async getExtensionInfo() {
const manifestPath = browser.extension.getURL("manifest.json");
const manifestPath = browser.runtime.getURL("manifest.json");
const response = await fetch(manifestPath);
const extensionInfo = await response.json();
return extensionInfo;

View file

@ -24,7 +24,7 @@ async function addMessage(message) {
divElement.innerText = message.text;
const imageElement = document.createElement("img");
const imagePath = browser.extension.getURL("/img/container-site-d-24.png");
const imagePath = browser.runtime.getURL("/img/container-site-d-24.png");
const response = await fetch(imagePath);
const blob = await response.blob();
const objectUrl = URL.createObjectURL(blob);

View file

@ -41,7 +41,7 @@ function addRemoveSiteIsolation() {
}
async function getExtensionInfo() {
const manifestPath = browser.extension.getURL("manifest.json");
const manifestPath = browser.runtime.getURL("manifest.json");
const response = await fetch(manifestPath);
const extensionInfo = await response.json();
return extensionInfo;