@duckduckgo/autoconsent 16.49.0 → 16.50.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/release-labels.yml +2 -6
- package/CHANGELOG.md +41 -0
- package/dist/addon-firefox/background.bundle.js +4 -1
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +20 -6
- 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 +4 -1
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +20 -6
- 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 +20 -6
- package/dist/autoconsent.esm.js +20 -6
- package/dist/autoconsent.playwright.js +20 -6
- package/dist/autoconsent.standalone.js +21 -7
- package/dist/types/eval-snippets.d.ts +2 -0
- package/lib/eval-snippets.ts +4 -0
- package/lib/heuristic-patterns.ts +16 -3
- package/package.json +1 -1
- package/rules/autoconsent/amazon-hiring.json +16 -0
- package/rules/autoconsent/avada-cookie-consent.json +43 -0
- package/rules/autoconsent/axeptio.json +17 -4
- package/rules/autoconsent/bigcrunch.json +39 -0
- package/rules/autoconsent/bricklink.json +33 -0
- package/rules/autoconsent/ceneo.json +9 -0
- package/rules/autoconsent/conjointly.json +43 -0
- package/rules/autoconsent/dhbbank.json +13 -0
- package/rules/autoconsent/ee-consent-notice.json +40 -0
- package/rules/autoconsent/fera-cookies.json +67 -0
- package/rules/autoconsent/la7-cmp.json +30 -0
- package/rules/autoconsent/laravel-cookie-consent.json +45 -0
- package/rules/autoconsent/legislation-gov-uk.json +43 -0
- package/rules/autoconsent/mackeeper.json +34 -0
- package/rules/autoconsent/ndl-go-jp.json +35 -0
- package/rules/autoconsent/paypal-us.json +3 -3
- package/rules/autoconsent/paypal.json +5 -2
- package/rules/autoconsent/texas-instruments.json +17 -0
- package/rules/autoconsent/thegrandyork.json +46 -0
- package/rules/autoconsent/thenounproject.json +61 -0
- package/rules/autoconsent/toyota.json +16 -5
- package/rules/autoconsent/uft-cookie-notice.json +15 -0
- package/rules/autoconsent/wbd-legal-terms.json +32 -0
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/tests/amazon-hiring.spec.ts +3 -0
- package/tests/avada-cookie-consent.spec.ts +9 -0
- package/tests/axeptio.spec.ts +8 -4
- package/tests/bigcrunch.spec.ts +16 -0
- package/tests/bricklink.spec.ts +3 -0
- package/tests/ceneo.spec.ts +3 -0
- package/tests/conjointly.spec.ts +3 -0
- package/tests/dhbbank.spec.ts +6 -0
- package/tests/ee-consent-notice.spec.ts +9 -0
- package/tests/fera-cookies.spec.ts +6 -0
- package/tests/la7-cmp.spec.ts +6 -0
- package/tests/laravel-cookie-consent.spec.ts +10 -0
- package/tests/legislation-gov-uk.spec.ts +3 -0
- package/tests/mackeeper.spec.ts +3 -0
- package/tests/ndl-go-jp.spec.ts +8 -0
- package/tests/paypal-us.spec.ts +2 -3
- package/tests/texas-instruments.spec.ts +3 -0
- package/tests/thegrandyork.spec.ts +3 -0
- package/tests/thenounproject.spec.ts +3 -0
- package/tests/uft-cookie-notice.spec.ts +3 -0
- package/tests/wbd-legal-terms.spec.ts +18 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +55 -0
- package/rules/autoconsent/paypal-cookieprefs.json +0 -29
- package/tests/paypal-cookieprefs.spec.ts +0 -7
|
@@ -336,6 +336,8 @@
|
|
|
336
336
|
EVAL_COOKIEFIRST_1: () => document.querySelectorAll("button[data-cookiefirst-accent-color=true][role=checkbox]:not([disabled])").forEach((i) => i.getAttribute("aria-checked") === "true" && i.click()) || true,
|
|
337
337
|
EVAL_COOKIEINFORMATION_0: () => CookieInformation.declineAllCategories() || true,
|
|
338
338
|
EVAL_COOKIEINFORMATION_1: () => CookieInformation.submitAllCategories() || true,
|
|
339
|
+
// turn the single-button form into a decline submission, same fields as the CMP's own decline form
|
|
340
|
+
EVAL_EE_CONSENT_DECLINE_0: () => document.querySelectorAll('#cookieConsentFormAccept input[name^="ee:cookies_"]').forEach((i) => i.value = "n") || true,
|
|
339
341
|
EVAL_ETSY_0: () => document.querySelectorAll(".gdpr-overlay-body input").forEach((toggle) => {
|
|
340
342
|
toggle.checked = false;
|
|
341
343
|
}) || true,
|
|
@@ -422,7 +424,8 @@
|
|
|
422
424
|
EVAL_USERCENTRICS_API_5: () => UC_UI.areAllConsentsAccepted() === true,
|
|
423
425
|
EVAL_USERCENTRICS_API_6: () => UC_UI.areAllConsentsAccepted() === false,
|
|
424
426
|
EVAL_USERCENTRICS_BUTTON_0: () => JSON.parse(localStorage.getItem("usercentrics")).consents.every((c) => c.isEssential || !c.consentStatus),
|
|
425
|
-
EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll("label[id$=cookies-deny-label]")).forEach((e) => e.click()) || true
|
|
427
|
+
EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll("label[id$=cookies-deny-label]")).forEach((e) => e.click()) || true,
|
|
428
|
+
EVAL_WBD_LTP_CLOSE: () => document.querySelector("dialog#ltp-dialog").close() || true
|
|
426
429
|
};
|
|
427
430
|
function getFunctionBody(snippetFunc) {
|
|
428
431
|
const snippetStr = snippetFunc.toString();
|
|
@@ -438,7 +441,8 @@
|
|
|
438
441
|
// "only necessary" is probably too broad
|
|
439
442
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
440
443
|
/(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi,
|
|
441
|
-
|
|
444
|
+
// a single qualifier is common: "optional", "essential", "necessary", "analytics", ...
|
|
445
|
+
/we (?:use|serve)(?: \w+)? cookies/gi,
|
|
442
446
|
/we are using cookies/gi,
|
|
443
447
|
/use of cookies/gi,
|
|
444
448
|
/website uses cookies to enhance your browsing experience/gi,
|
|
@@ -582,7 +586,10 @@
|
|
|
582
586
|
// "файлы cookie" / "cookie-файлы" / "куки-файлы" in any phrasing
|
|
583
587
|
/(?:файл[а-яё]*[\s-]+(?:cookie|куки)|(?:cookie|куки)[\s-]+файл[а-яё]*)/gi,
|
|
584
588
|
// Italian (IT)
|
|
585
|
-
/usiamo.{0,20}cookie/gi
|
|
589
|
+
/usiamo.{0,20}cookie/gi,
|
|
590
|
+
// Japanese (JA)
|
|
591
|
+
// e.g. "当サイトはCookieを使用しています", "クッキー(Cookie)を利用しています"
|
|
592
|
+
/(?:cookie|クッキー).{0,10}を(?:使用|利用)/gi
|
|
586
593
|
];
|
|
587
594
|
var REJECT_PATTERNS_ENGLISH = [
|
|
588
595
|
// e.g. "reject", "reject all", "reject all cookies", "deny all", "refuse cookies", "decline",
|
|
@@ -598,8 +605,8 @@
|
|
|
598
605
|
/^\s*(i\s+)?(want\s+to\s+)?(only\s+)?(use|accept|allow|keep|enable|choose|continue\s+with|i\s+confirm)\s*(only\s+)?(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s*(cookies)?\s*(continue|only)?\s*$/is,
|
|
599
606
|
/^\s*(i\s+)?(want\s+to\s+)?only\s+(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s*(cookies)?\s*(continue|only)?\s*$/is,
|
|
600
607
|
/^\s*(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s+((cookies\s+)?only|only\s+cookies)\s*$/is,
|
|
601
|
-
// e.g. "do not sell or share my personal information", "opt out of sale ..." (CCPA)
|
|
602
|
-
/do\s+not\s+sell|opt\s+out\s+of\s+sale/is,
|
|
608
|
+
// e.g. "do not sell or share my personal information", "do not share my personal information", "opt out of sale ..." (CCPA)
|
|
609
|
+
/do\s+not\s+sell|do\s+not\s+share\s+my\s+(personal\s+)?(information|info|data)|opt\s+out\s+of\s+sale/is,
|
|
603
610
|
// e.g. "opt-out of sale/share or targeted advertising", "opt-out of advertising/social media cookies"
|
|
604
611
|
/^opt[ -]?out of /is,
|
|
605
612
|
// e.g. "reject all except strictly necessary", "reject all (except necessary cookies)"
|
|
@@ -746,6 +753,12 @@
|
|
|
746
753
|
];
|
|
747
754
|
var REJECT_PATTERNS_TURKISH = ["reddet", "\xE7erezleri reddet"];
|
|
748
755
|
var REJECT_PATTERNS_INDONESIAN = ["tolak cookie"];
|
|
756
|
+
var REJECT_PATTERNS_JAPANESE = [
|
|
757
|
+
// e.g. "拒否", "すべて拒否", "全て拒否する", "cookieを拒否"
|
|
758
|
+
/^(すべて|全て)?\s?(の)?(cookie|クッキー)?\s?(を)?拒否(する)?$/i,
|
|
759
|
+
"\u540C\u610F\u3057\u306A\u3044",
|
|
760
|
+
"\u540C\u610F\u3057\u307E\u305B\u3093"
|
|
761
|
+
];
|
|
749
762
|
var REJECT_PATTERNS = [
|
|
750
763
|
...REJECT_PATTERNS_ENGLISH,
|
|
751
764
|
...REJECT_PATTERNS_DUTCH,
|
|
@@ -763,7 +776,8 @@
|
|
|
763
776
|
...REJECT_PATTERNS_POLISH,
|
|
764
777
|
...REJECT_PATTERNS_RUSSIAN,
|
|
765
778
|
...REJECT_PATTERNS_TURKISH,
|
|
766
|
-
...REJECT_PATTERNS_INDONESIAN
|
|
779
|
+
...REJECT_PATTERNS_INDONESIAN,
|
|
780
|
+
...REJECT_PATTERNS_JAPANESE
|
|
767
781
|
];
|
|
768
782
|
var BUTTON_NEVER_MATCH_PATTERNS = [
|
|
769
783
|
/pay|subscribe/is,
|