Don't use hard coded browser name prefix 3
This commit is contained in:
parent
ba885834ce
commit
dea7a5e952
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ const DEFAULT_COLOR = "blue";
|
||||||
const DEFAULT_ICON = "circle";
|
const DEFAULT_ICON = "circle";
|
||||||
const NEW_CONTAINER_ID = "new";
|
const NEW_CONTAINER_ID = "new";
|
||||||
|
|
||||||
|
const BROWSER_NAME = (await browser.runtime.getBrowserInfo()).name.toLowerCase();
|
||||||
const ONBOARDING_STORAGE_KEY = "onboarding-stage";
|
const ONBOARDING_STORAGE_KEY = "onboarding-stage";
|
||||||
|
|
||||||
// List of panels
|
// List of panels
|
||||||
|
@ -202,7 +203,7 @@ const Logic = {
|
||||||
},
|
},
|
||||||
|
|
||||||
userContextId(cookieStoreId = "") {
|
userContextId(cookieStoreId = "") {
|
||||||
const userContextId = cookieStoreId.replace("firefox-container-", "");
|
const userContextId = cookieStoreId.replace(BROWSER_NAME + "-container-", "");
|
||||||
return (userContextId !== cookieStoreId) ? Number(userContextId) : false;
|
return (userContextId !== cookieStoreId) ? Number(userContextId) : false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue