save confirm page url to the local storage as a backup
This commit is contained in:
parent
f159e42029
commit
741385738b
2 changed files with 10 additions and 1 deletions
|
@ -490,6 +490,8 @@ const assignManager = {
|
|||
currentCookieStoreId = backgroundLogic.cookieStoreId(currentUserContextId);
|
||||
confirmUrl += `¤tCookieStoreId=${currentCookieStoreId}`;
|
||||
}
|
||||
|
||||
browser.storage.local.set({ "confirmUrl": confirmUrl});
|
||||
browser.tabs.create({
|
||||
url: confirmUrl,
|
||||
cookieStoreId: currentCookieStoreId,
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
async function load() {
|
||||
const searchParams = new URL(window.location).searchParams;
|
||||
|
||||
let searchParams = new URL(window.location).searchParams;
|
||||
|
||||
if (!searchParams.get("url")) {
|
||||
const savedUrl = await browser.storage.local.get("confirmUrl");
|
||||
searchParams = new URL(savedUrl.confirmUrl).searchParams;
|
||||
}
|
||||
|
||||
const redirectUrl = searchParams.get("url");
|
||||
const cookieStoreId = searchParams.get("cookieStoreId");
|
||||
const currentCookieStoreId = searchParams.get("currentCookieStoreId");
|
||||
|
|
Loading…
Add table
Reference in a new issue