@duckduckgo/autoconsent 16.21.0 → 16.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/addon-firefox/background.bundle.js +16 -2
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +16 -2
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rule-index.json +1 -1
- package/dist/addon-firefox/rules.json +1 -1
- package/dist/addon-mv3/background.bundle.js +16 -2
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +16 -2
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rule-index.json +1 -1
- package/dist/addon-mv3/rules.json +1 -1
- package/dist/autoconsent.cjs.js +16 -2
- package/dist/autoconsent.esm.js +16 -2
- package/dist/autoconsent.playwright.js +16 -2
- package/dist/autoconsent.standalone.js +17 -3
- package/dist/types/eval-snippets.d.ts +4 -1
- package/lib/eval-snippets.ts +16 -2
- package/package.json +1 -1
- package/rules/autoconsent/appconsent-legacy.json +31 -0
- package/rules/autoconsent/appconsent.json +31 -0
- package/rules/autoconsent/consentmanager-ncmp.json +34 -0
- package/rules/autoconsent/krown-cookie-banner.json +34 -0
- package/rules/autoconsent/pornpics-de.json +13 -0
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/tests/appconsent-legacy.spec.ts +7 -0
- package/tests/appconsent.spec.ts +7 -0
- package/tests/consentmanager-ncmp.spec.ts +5 -0
- package/tests/krown-cookie-banner.spec.ts +3 -0
- package/tests/pornpics-de.spec.ts +3 -0
|
@@ -19,11 +19,24 @@
|
|
|
19
19
|
const disabled = window.Didomi?.getUserConsentStatusForAll?.()?.purposes?.disabled;
|
|
20
20
|
return Array.isArray(disabled) && disabled.length > 0;
|
|
21
21
|
},
|
|
22
|
-
EVAL_CONSENTMANAGER_1: () =>
|
|
23
|
-
|
|
22
|
+
EVAL_CONSENTMANAGER_1: () => {
|
|
23
|
+
const cmpData = window.__cmp?.("getCMPData");
|
|
24
|
+
return !!cmpData && typeof cmpData === "object";
|
|
25
|
+
},
|
|
26
|
+
EVAL_CONSENTMANAGER_2: () => window.__cmp?.("consentStatus")?.userChoiceExists === false,
|
|
24
27
|
EVAL_CONSENTMANAGER_3: () => __cmp("setConsent", 0),
|
|
25
28
|
EVAL_CONSENTMANAGER_4: () => __cmp("setConsent", 1),
|
|
26
29
|
EVAL_CONSENTMANAGER_5: () => __cmp("consentStatus").userChoiceExists,
|
|
30
|
+
EVAL_CONSENTMANAGER_NCMP_REJECT: () => {
|
|
31
|
+
if (typeof window.__npcmp !== "function") return false;
|
|
32
|
+
window.__npcmp("reject");
|
|
33
|
+
return true;
|
|
34
|
+
},
|
|
35
|
+
EVAL_CONSENTMANAGER_NCMP_ACCEPT: () => {
|
|
36
|
+
if (typeof window.__npcmp !== "function") return false;
|
|
37
|
+
window.__npcmp("save");
|
|
38
|
+
return true;
|
|
39
|
+
},
|
|
27
40
|
EVAL_COOKIEBOT_1: () => !!window.Cookiebot,
|
|
28
41
|
EVAL_COOKIEBOT_2: () => !window.Cookiebot.hasResponse && window.Cookiebot.dialog?.visible === true,
|
|
29
42
|
EVAL_COOKIEBOT_3: () => window.Cookiebot.withdraw() || true,
|
|
@@ -116,6 +129,7 @@
|
|
|
116
129
|
if (x.checked) x.click();
|
|
117
130
|
}) || true,
|
|
118
131
|
EVAL_IUBENDA_1: () => !!document.cookie.match(/_iub_cs-\d+=/),
|
|
132
|
+
EVAL_KROWN_COOKIE_BANNER_TEST: () => localStorage.getItem("krown-cookie-banner") === "true",
|
|
119
133
|
EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Reject|Ablehnen"))[0].click() || true,
|
|
120
134
|
EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
|
|
121
135
|
EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC|GHCC"),
|