fix: make "never-ask" checkbox change behavior of deny case
This commit is contained in:
parent
a5ec9e2028
commit
0f6acd1316
1 changed files with 17 additions and 0 deletions
|
@ -74,6 +74,23 @@ function getCurrentTab() {
|
||||||
|
|
||||||
async function denySubmit(redirectUrl) {
|
async function denySubmit(redirectUrl) {
|
||||||
const tab = await getCurrentTab();
|
const tab = await getCurrentTab();
|
||||||
|
const neverAsk = document.getElementById("never-ask").checked;
|
||||||
|
|
||||||
|
if (neverAsk) {
|
||||||
|
const searchParams = new URL(window.location).searchParams;
|
||||||
|
const currentCookieStoreId = searchParams.get("currentCookieStoreId");
|
||||||
|
|
||||||
|
await browser.runtime.sendMessage({
|
||||||
|
method: "setOrRemoveAssignment",
|
||||||
|
tabId: tab[0].id,
|
||||||
|
url: redirectUrl,
|
||||||
|
userContextId: currentCookieStoreId ? Utils.userContextId(
|
||||||
|
currentCookieStoreId
|
||||||
|
) : false,
|
||||||
|
value: !currentCookieStoreId,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
await browser.runtime.sendMessage({
|
await browser.runtime.sendMessage({
|
||||||
method: "exemptContainerAssignment",
|
method: "exemptContainerAssignment",
|
||||||
tabId: tab[0].id,
|
tabId: tab[0].id,
|
||||||
|
|
Loading…
Add table
Reference in a new issue