Fixed 'open in current container button' not working
This commit is contained in:
parent
68376e4ecf
commit
d76c924dcf
1 changed files with 7 additions and 18 deletions
|
@ -17,25 +17,14 @@ async function load() {
|
|||
const currentContainer = await browser.contextualIdentities.get(currentCookieStoreId);
|
||||
document.getElementById("current-container-name").textContent = currentContainer.name;
|
||||
}
|
||||
|
||||
document.getElementById("redirect-form").addEventListener("submit", (e) => {
|
||||
document.getElementById("deny").addEventListener("click", (e) => {
|
||||
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);
|
||||
break;
|
||||
case "confirm":
|
||||
confirmSubmit(redirectUrl, cookieStoreId);
|
||||
break;
|
||||
}
|
||||
denySubmit(redirectUrl);
|
||||
});
|
||||
|
||||
document.getElementById("confirm").addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
confirmSubmit(redirectUrl, cookieStoreId);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue