@duckduckgo/autoconsent 16.20.1 → 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/.github/workflows/asana-sync.yml +2 -1
- package/CHANGELOG.md +46 -0
- package/data/coverage.json +1362 -1255
- package/dist/addon-firefox/background.bundle.js +17 -2
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +17 -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 +17 -2
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +17 -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 +17 -2
- package/dist/autoconsent.esm.js +17 -2
- package/dist/autoconsent.playwright.js +17 -2
- package/dist/autoconsent.standalone.js +18 -3
- package/dist/types/eval-snippets.d.ts +5 -1
- package/lib/eval-snippets.ts +17 -2
- package/package.json +1 -1
- package/rules/autoconsent/appconsent-legacy.json +31 -0
- package/rules/autoconsent/appconsent.json +31 -0
- package/rules/autoconsent/aylo-cookie-banner.json +59 -4
- package/rules/autoconsent/consentmanager-ncmp.json +34 -0
- package/rules/autoconsent/cookie-banner-element.json +8 -0
- package/rules/autoconsent/ctv-disneyonice.json +12 -0
- package/rules/autoconsent/fever.json +42 -0
- package/rules/autoconsent/ibanez.json +13 -0
- package/rules/autoconsent/krown-cookie-banner.json +34 -0
- package/rules/autoconsent/pornpics-de.json +13 -0
- package/rules/autoconsent/simplehuman-com.json +33 -0
- package/rules/autoconsent/toho-one.json +50 -0
- package/rules/autoconsent/tohotheater-jp.json +20 -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/cookie-banner-element.spec.ts +7 -0
- package/tests/ctv-disneyonice.spec.ts +5 -0
- package/tests/fever.spec.ts +3 -0
- package/tests/ibanez.spec.ts +3 -0
- package/tests/krown-cookie-banner.spec.ts +3 -0
- package/tests/pornpics-de.spec.ts +3 -0
- package/tests/simplehuman-com.spec.ts +3 -0
- package/tests/toho-one.spec.ts +3 -0
- package/tests/tohotheater-jp.spec.ts +3 -0
package/dist/autoconsent.cjs.js
CHANGED
|
@@ -258,11 +258,24 @@ var snippets = {
|
|
|
258
258
|
const disabled = window.Didomi?.getUserConsentStatusForAll?.()?.purposes?.disabled;
|
|
259
259
|
return Array.isArray(disabled) && disabled.length > 0;
|
|
260
260
|
},
|
|
261
|
-
EVAL_CONSENTMANAGER_1: () =>
|
|
262
|
-
|
|
261
|
+
EVAL_CONSENTMANAGER_1: () => {
|
|
262
|
+
const cmpData = window.__cmp?.("getCMPData");
|
|
263
|
+
return !!cmpData && typeof cmpData === "object";
|
|
264
|
+
},
|
|
265
|
+
EVAL_CONSENTMANAGER_2: () => window.__cmp?.("consentStatus")?.userChoiceExists === false,
|
|
263
266
|
EVAL_CONSENTMANAGER_3: () => __cmp("setConsent", 0),
|
|
264
267
|
EVAL_CONSENTMANAGER_4: () => __cmp("setConsent", 1),
|
|
265
268
|
EVAL_CONSENTMANAGER_5: () => __cmp("consentStatus").userChoiceExists,
|
|
269
|
+
EVAL_CONSENTMANAGER_NCMP_REJECT: () => {
|
|
270
|
+
if (typeof window.__npcmp !== "function") return false;
|
|
271
|
+
window.__npcmp("reject");
|
|
272
|
+
return true;
|
|
273
|
+
},
|
|
274
|
+
EVAL_CONSENTMANAGER_NCMP_ACCEPT: () => {
|
|
275
|
+
if (typeof window.__npcmp !== "function") return false;
|
|
276
|
+
window.__npcmp("save");
|
|
277
|
+
return true;
|
|
278
|
+
},
|
|
266
279
|
EVAL_COOKIEBOT_1: () => !!window.Cookiebot,
|
|
267
280
|
EVAL_COOKIEBOT_2: () => !window.Cookiebot.hasResponse && window.Cookiebot.dialog?.visible === true,
|
|
268
281
|
EVAL_COOKIEBOT_3: () => window.Cookiebot.withdraw() || true,
|
|
@@ -310,6 +323,7 @@ var snippets = {
|
|
|
310
323
|
// declarative rules
|
|
311
324
|
EVAL_ADOPT_TEST: () => !!localStorage.getItem("adoptConsentMode"),
|
|
312
325
|
EVAL_ADULTFRIENDFINDER_TEST: () => !!localStorage.getItem("cookieConsent"),
|
|
326
|
+
EVAL_AYLO_COOKIE_MANAGER_READY: () => !!(window.wl_cookie_consent_manager || window._Cookie_Consent_Manager_brand),
|
|
313
327
|
EVAL_BAHN_TEST: () => utag.gdpr.getSelectedCategories().length === 1,
|
|
314
328
|
EVAL_BIGCOMMERCE_CONSENT_MANAGER_DETECT: () => !!(window.consentManager && window.consentManager.version),
|
|
315
329
|
EVAL_BORLABS_0: () => !JSON.parse(
|
|
@@ -354,6 +368,7 @@ var snippets = {
|
|
|
354
368
|
if (x.checked) x.click();
|
|
355
369
|
}) || true,
|
|
356
370
|
EVAL_IUBENDA_1: () => !!document.cookie.match(/_iub_cs-\d+=/),
|
|
371
|
+
EVAL_KROWN_COOKIE_BANNER_TEST: () => localStorage.getItem("krown-cookie-banner") === "true",
|
|
357
372
|
EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Reject|Ablehnen"))[0].click() || true,
|
|
358
373
|
EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
|
|
359
374
|
EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC|GHCC"),
|
package/dist/autoconsent.esm.js
CHANGED
|
@@ -228,11 +228,24 @@ var snippets = {
|
|
|
228
228
|
const disabled = window.Didomi?.getUserConsentStatusForAll?.()?.purposes?.disabled;
|
|
229
229
|
return Array.isArray(disabled) && disabled.length > 0;
|
|
230
230
|
},
|
|
231
|
-
EVAL_CONSENTMANAGER_1: () =>
|
|
232
|
-
|
|
231
|
+
EVAL_CONSENTMANAGER_1: () => {
|
|
232
|
+
const cmpData = window.__cmp?.("getCMPData");
|
|
233
|
+
return !!cmpData && typeof cmpData === "object";
|
|
234
|
+
},
|
|
235
|
+
EVAL_CONSENTMANAGER_2: () => window.__cmp?.("consentStatus")?.userChoiceExists === false,
|
|
233
236
|
EVAL_CONSENTMANAGER_3: () => __cmp("setConsent", 0),
|
|
234
237
|
EVAL_CONSENTMANAGER_4: () => __cmp("setConsent", 1),
|
|
235
238
|
EVAL_CONSENTMANAGER_5: () => __cmp("consentStatus").userChoiceExists,
|
|
239
|
+
EVAL_CONSENTMANAGER_NCMP_REJECT: () => {
|
|
240
|
+
if (typeof window.__npcmp !== "function") return false;
|
|
241
|
+
window.__npcmp("reject");
|
|
242
|
+
return true;
|
|
243
|
+
},
|
|
244
|
+
EVAL_CONSENTMANAGER_NCMP_ACCEPT: () => {
|
|
245
|
+
if (typeof window.__npcmp !== "function") return false;
|
|
246
|
+
window.__npcmp("save");
|
|
247
|
+
return true;
|
|
248
|
+
},
|
|
236
249
|
EVAL_COOKIEBOT_1: () => !!window.Cookiebot,
|
|
237
250
|
EVAL_COOKIEBOT_2: () => !window.Cookiebot.hasResponse && window.Cookiebot.dialog?.visible === true,
|
|
238
251
|
EVAL_COOKIEBOT_3: () => window.Cookiebot.withdraw() || true,
|
|
@@ -280,6 +293,7 @@ var snippets = {
|
|
|
280
293
|
// declarative rules
|
|
281
294
|
EVAL_ADOPT_TEST: () => !!localStorage.getItem("adoptConsentMode"),
|
|
282
295
|
EVAL_ADULTFRIENDFINDER_TEST: () => !!localStorage.getItem("cookieConsent"),
|
|
296
|
+
EVAL_AYLO_COOKIE_MANAGER_READY: () => !!(window.wl_cookie_consent_manager || window._Cookie_Consent_Manager_brand),
|
|
283
297
|
EVAL_BAHN_TEST: () => utag.gdpr.getSelectedCategories().length === 1,
|
|
284
298
|
EVAL_BIGCOMMERCE_CONSENT_MANAGER_DETECT: () => !!(window.consentManager && window.consentManager.version),
|
|
285
299
|
EVAL_BORLABS_0: () => !JSON.parse(
|
|
@@ -324,6 +338,7 @@ var snippets = {
|
|
|
324
338
|
if (x.checked) x.click();
|
|
325
339
|
}) || true,
|
|
326
340
|
EVAL_IUBENDA_1: () => !!document.cookie.match(/_iub_cs-\d+=/),
|
|
341
|
+
EVAL_KROWN_COOKIE_BANNER_TEST: () => localStorage.getItem("krown-cookie-banner") === "true",
|
|
327
342
|
EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Reject|Ablehnen"))[0].click() || true,
|
|
328
343
|
EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
|
|
329
344
|
EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC|GHCC"),
|
|
@@ -230,11 +230,24 @@
|
|
|
230
230
|
const disabled = window.Didomi?.getUserConsentStatusForAll?.()?.purposes?.disabled;
|
|
231
231
|
return Array.isArray(disabled) && disabled.length > 0;
|
|
232
232
|
},
|
|
233
|
-
EVAL_CONSENTMANAGER_1: () =>
|
|
234
|
-
|
|
233
|
+
EVAL_CONSENTMANAGER_1: () => {
|
|
234
|
+
const cmpData = window.__cmp?.("getCMPData");
|
|
235
|
+
return !!cmpData && typeof cmpData === "object";
|
|
236
|
+
},
|
|
237
|
+
EVAL_CONSENTMANAGER_2: () => window.__cmp?.("consentStatus")?.userChoiceExists === false,
|
|
235
238
|
EVAL_CONSENTMANAGER_3: () => __cmp("setConsent", 0),
|
|
236
239
|
EVAL_CONSENTMANAGER_4: () => __cmp("setConsent", 1),
|
|
237
240
|
EVAL_CONSENTMANAGER_5: () => __cmp("consentStatus").userChoiceExists,
|
|
241
|
+
EVAL_CONSENTMANAGER_NCMP_REJECT: () => {
|
|
242
|
+
if (typeof window.__npcmp !== "function") return false;
|
|
243
|
+
window.__npcmp("reject");
|
|
244
|
+
return true;
|
|
245
|
+
},
|
|
246
|
+
EVAL_CONSENTMANAGER_NCMP_ACCEPT: () => {
|
|
247
|
+
if (typeof window.__npcmp !== "function") return false;
|
|
248
|
+
window.__npcmp("save");
|
|
249
|
+
return true;
|
|
250
|
+
},
|
|
238
251
|
EVAL_COOKIEBOT_1: () => !!window.Cookiebot,
|
|
239
252
|
EVAL_COOKIEBOT_2: () => !window.Cookiebot.hasResponse && window.Cookiebot.dialog?.visible === true,
|
|
240
253
|
EVAL_COOKIEBOT_3: () => window.Cookiebot.withdraw() || true,
|
|
@@ -282,6 +295,7 @@
|
|
|
282
295
|
// declarative rules
|
|
283
296
|
EVAL_ADOPT_TEST: () => !!localStorage.getItem("adoptConsentMode"),
|
|
284
297
|
EVAL_ADULTFRIENDFINDER_TEST: () => !!localStorage.getItem("cookieConsent"),
|
|
298
|
+
EVAL_AYLO_COOKIE_MANAGER_READY: () => !!(window.wl_cookie_consent_manager || window._Cookie_Consent_Manager_brand),
|
|
285
299
|
EVAL_BAHN_TEST: () => utag.gdpr.getSelectedCategories().length === 1,
|
|
286
300
|
EVAL_BIGCOMMERCE_CONSENT_MANAGER_DETECT: () => !!(window.consentManager && window.consentManager.version),
|
|
287
301
|
EVAL_BORLABS_0: () => !JSON.parse(
|
|
@@ -326,6 +340,7 @@
|
|
|
326
340
|
if (x.checked) x.click();
|
|
327
341
|
}) || true,
|
|
328
342
|
EVAL_IUBENDA_1: () => !!document.cookie.match(/_iub_cs-\d+=/),
|
|
343
|
+
EVAL_KROWN_COOKIE_BANNER_TEST: () => localStorage.getItem("krown-cookie-banner") === "true",
|
|
329
344
|
EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Reject|Ablehnen"))[0].click() || true,
|
|
330
345
|
EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
|
|
331
346
|
EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC|GHCC"),
|