Replace deprecated method

Close #2047
This commit is contained in:
Carlos Marin 2021-05-18 14:36:29 -03:00
parent 4b56a2f0bb
commit 4e4ed390e0
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;