From dea7a5e9525ee782d1477e6ee7dafcc8cf3dc360 Mon Sep 17 00:00:00 2001 From: Aaron-P Date: Sun, 14 Apr 2019 19:42:26 -0600 Subject: [PATCH] Don't use hard coded browser name prefix 3 --- src/js/popup.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/popup.js b/src/js/popup.js index 7593bea..b3af998 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -9,6 +9,7 @@ const DEFAULT_COLOR = "blue"; const DEFAULT_ICON = "circle"; const NEW_CONTAINER_ID = "new"; +const BROWSER_NAME = (await browser.runtime.getBrowserInfo()).name.toLowerCase(); const ONBOARDING_STORAGE_KEY = "onboarding-stage"; // List of panels @@ -202,7 +203,7 @@ const Logic = { }, userContextId(cookieStoreId = "") { - const userContextId = cookieStoreId.replace("firefox-container-", ""); + const userContextId = cookieStoreId.replace(BROWSER_NAME + "-container-", ""); return (userContextId !== cookieStoreId) ? Number(userContextId) : false; },