@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
|
@@ -222,11 +222,24 @@
|
|
|
222
222
|
const disabled = window.Didomi?.getUserConsentStatusForAll?.()?.purposes?.disabled;
|
|
223
223
|
return Array.isArray(disabled) && disabled.length > 0;
|
|
224
224
|
},
|
|
225
|
-
EVAL_CONSENTMANAGER_1: () =>
|
|
226
|
-
|
|
225
|
+
EVAL_CONSENTMANAGER_1: () => {
|
|
226
|
+
const cmpData = window.__cmp?.("getCMPData");
|
|
227
|
+
return !!cmpData && typeof cmpData === "object";
|
|
228
|
+
},
|
|
229
|
+
EVAL_CONSENTMANAGER_2: () => window.__cmp?.("consentStatus")?.userChoiceExists === false,
|
|
227
230
|
EVAL_CONSENTMANAGER_3: () => __cmp("setConsent", 0),
|
|
228
231
|
EVAL_CONSENTMANAGER_4: () => __cmp("setConsent", 1),
|
|
229
232
|
EVAL_CONSENTMANAGER_5: () => __cmp("consentStatus").userChoiceExists,
|
|
233
|
+
EVAL_CONSENTMANAGER_NCMP_REJECT: () => {
|
|
234
|
+
if (typeof window.__npcmp !== "function") return false;
|
|
235
|
+
window.__npcmp("reject");
|
|
236
|
+
return true;
|
|
237
|
+
},
|
|
238
|
+
EVAL_CONSENTMANAGER_NCMP_ACCEPT: () => {
|
|
239
|
+
if (typeof window.__npcmp !== "function") return false;
|
|
240
|
+
window.__npcmp("save");
|
|
241
|
+
return true;
|
|
242
|
+
},
|
|
230
243
|
EVAL_COOKIEBOT_1: () => !!window.Cookiebot,
|
|
231
244
|
EVAL_COOKIEBOT_2: () => !window.Cookiebot.hasResponse && window.Cookiebot.dialog?.visible === true,
|
|
232
245
|
EVAL_COOKIEBOT_3: () => window.Cookiebot.withdraw() || true,
|
|
@@ -319,6 +332,7 @@
|
|
|
319
332
|
if (x.checked) x.click();
|
|
320
333
|
}) || true,
|
|
321
334
|
EVAL_IUBENDA_1: () => !!document.cookie.match(/_iub_cs-\d+=/),
|
|
335
|
+
EVAL_KROWN_COOKIE_BANNER_TEST: () => localStorage.getItem("krown-cookie-banner") === "true",
|
|
322
336
|
EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Reject|Ablehnen"))[0].click() || true,
|
|
323
337
|
EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
|
|
324
338
|
EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC|GHCC"),
|