Skip to content

Commit

Permalink
Merge pull request #2052 from cammarin/runtime-geturl
Browse files Browse the repository at this point in the history
Replace deprecated method `browser.extension.getURL()`
  • Loading branch information
groovecoder committed Jul 26, 2021
2 parents d2c00a1 + 4e4ed39 commit 081ea0b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/js/background/assignManager.js
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/js/background/backgroundLogic.js
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/js/content-script.js
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/js/popup.js
Expand Up @@ -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;
Expand Down

0 comments on commit 081ea0b

Please sign in to comment.