Fixed 'open in current container button' not working
This commit is contained in:
parent
ae1f80b8b5
commit
19e694d8eb
1 changed files with 7 additions and 18 deletions
|
@ -17,25 +17,14 @@ async function load() {
|
||||||
const currentContainer = await browser.contextualIdentities.get(currentCookieStoreId);
|
const currentContainer = await browser.contextualIdentities.get(currentCookieStoreId);
|
||||||
document.getElementById("current-container-name").textContent = currentContainer.name;
|
document.getElementById("current-container-name").textContent = currentContainer.name;
|
||||||
}
|
}
|
||||||
|
document.getElementById("deny").addEventListener("click", (e) => {
|
||||||
document.getElementById("redirect-form").addEventListener("submit", (e) => {
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let button = "confirm"; // Confirm is the form default.
|
|
||||||
let buttonTarget = e.explicitOriginalTarget;
|
|
||||||
if (buttonTarget.tagName !== "BUTTON") {
|
|
||||||
buttonTarget = buttonTarget.closest("button");
|
|
||||||
}
|
|
||||||
if (buttonTarget && buttonTarget.id) {
|
|
||||||
button = buttonTarget.id;
|
|
||||||
}
|
|
||||||
switch (button) {
|
|
||||||
case "deny":
|
|
||||||
denySubmit(redirectUrl);
|
denySubmit(redirectUrl);
|
||||||
break;
|
});
|
||||||
case "confirm":
|
|
||||||
|
document.getElementById("confirm").addEventListener("click", (e) => {
|
||||||
|
e.preventDefault();
|
||||||
confirmSubmit(redirectUrl, cookieStoreId);
|
confirmSubmit(redirectUrl, cookieStoreId);
|
||||||
break;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue