This commit is contained in:
Garry W 2025-05-21 10:43:17 +10:00 committed by GitHub
commit 490a2c3f53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View file

@ -808,9 +808,8 @@ window.assignManager = {
return this.createTabWrapper(url, cookieStoreId, index, active, openerTabId, groupId);
} else {
let confirmUrl = `${loadPage}?url=${this.encodeURLProperty(url)}&cookieStoreId=${cookieStoreId}`;
let currentCookieStoreId;
if (currentUserContextId) {
currentCookieStoreId = backgroundLogic.cookieStoreId(currentUserContextId);
const currentCookieStoreId = backgroundLogic.cookieStoreId(currentUserContextId);
if (parseInt(currentUserContextId, 10) > 0) {
confirmUrl += `&currentCookieStoreId=${currentCookieStoreId}`;
}
return this.createTabWrapper(

View file

@ -121,6 +121,9 @@ const backgroundLogic = {
if (!cookieStoreId) {
return false;
}
if (cookieStoreId === "firefox-default") {
return "0";
}
const container = cookieStoreId.replace("firefox-container-", "");
if (container !== cookieStoreId) {
return container;
@ -481,7 +484,7 @@ const backgroundLogic = {
},
cookieStoreId(userContextId) {
if(userContextId === 0) return "firefox-default";
if (parseInt(userContextId, 10) === 0) return "firefox-default";
return `firefox-container-${userContextId}`;
}
};

View file

@ -73,7 +73,7 @@ describe("Assignment Comfirm Page Feature", function () {
url: "moz-extension://fake/confirm-page.html?" +
`url=${encodeURIComponent(url)}` +
`&cookieStoreId=${this.webExt.tab.cookieStoreId}`,
cookieStoreId: undefined,
cookieStoreId: "firefox-default",
openerTabId: null,
index: 2,
active: true