@duckduckgo/autoconsent 16.48.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/.agents/skills/optimize-button-patterns/SKILL.md +145 -0
- package/.agents/skills/oxylabs-testing/SKILL.md +1 -1
- package/.claude/skills/optimize-button-patterns/SKILL.md +7 -0
- package/.github/workflows/release-labels.yml +2 -6
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +77 -0
- package/data/Readme.md +6 -0
- package/data/labelled-button-texts.csv +7006 -0
- package/dist/addon-firefox/background.bundle.js +6 -1
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +26 -13
- 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 +6 -1
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +26 -13
- 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 +26 -13
- package/dist/autoconsent.esm.js +26 -13
- package/dist/autoconsent.playwright.js +26 -13
- package/dist/autoconsent.standalone.js +27 -14
- package/dist/types/eval-snippets.d.ts +3 -0
- package/lib/eval-snippets.ts +7 -0
- package/lib/heuristic-patterns.ts +20 -11
- package/package.json +3 -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/borlabs.json +5 -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/consentmo.json +51 -7
- package/rules/autoconsent/cookie-popup-close-cookies.json +37 -0
- package/rules/autoconsent/cookieconsent2.json +6 -1
- package/rules/autoconsent/costco.json +27 -0
- package/rules/autoconsent/datasign.json +85 -0
- package/rules/autoconsent/dhbbank.json +13 -0
- package/rules/autoconsent/ee-consent-notice.json +40 -0
- package/rules/autoconsent/ensembleartsphilly.json +33 -0
- package/rules/autoconsent/evium.de.json +33 -0
- package/rules/autoconsent/fera-cookies.json +67 -0
- package/rules/autoconsent/iubenda.json +13 -7
- 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/pandectes.json +48 -15
- package/rules/autoconsent/passle.json +32 -0
- package/rules/autoconsent/paypal-us.json +3 -3
- package/rules/autoconsent/paypal.json +5 -2
- package/rules/autoconsent/primeconsent.json +39 -0
- package/rules/autoconsent/shinden.pl.json +34 -0
- 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/tri-table.json +14 -0
- package/rules/autoconsent/truevault-polaris.json +63 -0
- package/rules/autoconsent/uft-cookie-notice.json +15 -0
- package/rules/autoconsent/wbd-legal-terms.json +32 -0
- package/rules/autoconsent/webflow.json +1 -1
- package/rules/autoconsent/wix.json +90 -8
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/scripts/benchmark-button-classification.ts +75 -0
- package/scripts/button-text-benchmark.ts +102 -0
- 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/borlabs.spec.ts +7 -3
- package/tests/bricklink.spec.ts +3 -0
- package/tests/ceneo.spec.ts +3 -0
- package/tests/conjointly.spec.ts +3 -0
- package/tests/consentmo.spec.ts +1 -0
- package/tests/cookie-popup-close-cookies.spec.ts +10 -0
- package/tests/cookieconsent2.spec.ts +6 -1
- package/tests/costco.spec.ts +5 -0
- package/tests/datasign.spec.ts +8 -0
- package/tests/dhbbank.spec.ts +6 -0
- package/tests/ee-consent-notice.spec.ts +9 -0
- package/tests/ensembleartsphilly.spec.ts +6 -0
- package/tests/evium.de.spec.ts +5 -0
- package/tests/fera-cookies.spec.ts +6 -0
- package/tests/iubenda.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/pandectes.spec.ts +20 -1
- package/tests/passle.spec.ts +8 -0
- package/tests/paypal-us.spec.ts +2 -3
- package/tests/primeconsent.spec.ts +11 -0
- package/tests/shinden.pl.spec.ts +5 -0
- package/tests/texas-instruments.spec.ts +3 -0
- package/tests/thegrandyork.spec.ts +3 -0
- package/tests/thenounproject.spec.ts +3 -0
- package/tests/tri-table.spec.ts +5 -0
- package/tests/truevault-polaris.spec.ts +9 -0
- package/tests/uft-cookie-notice.spec.ts +3 -0
- package/tests/wbd-legal-terms.spec.ts +18 -0
- package/tests/webflow.spec.ts +7 -1
- package/tests/wix.spec.ts +8 -1
- package/tests-wtr/heuristics/button-classification-accuracy.test.ts +41 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +64 -0
- package/rules/autoconsent/paypal-cookieprefs.json +0 -29
- package/tests/paypal-cookieprefs.spec.ts +0 -7
package/dist/autoconsent.cjs.js
CHANGED
|
@@ -347,6 +347,8 @@ var snippets = {
|
|
|
347
347
|
).consents.statistics,
|
|
348
348
|
EVAL_CC_BANNER2_0: () => !!document.cookie.match(/sncc=[^;]+D%3Dtrue/),
|
|
349
349
|
EVAL_COINBASE_0: () => JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent.length <= 1,
|
|
350
|
+
// the close icon is an SVG, which has no click() method
|
|
351
|
+
EVAL_COOKIE_POPUP_CLOSE: () => document.querySelector("#cookie-popup #close-cookies").dispatchEvent(new MouseEvent("click", { bubbles: true })) || true,
|
|
350
352
|
EVAL_COOKIE_LAW_INFO_0: () => {
|
|
351
353
|
if (CLI.disableAllCookies) CLI.disableAllCookies();
|
|
352
354
|
if (CLI.reject_close) CLI.reject_close();
|
|
@@ -370,6 +372,8 @@ var snippets = {
|
|
|
370
372
|
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,
|
|
371
373
|
EVAL_COOKIEINFORMATION_0: () => CookieInformation.declineAllCategories() || true,
|
|
372
374
|
EVAL_COOKIEINFORMATION_1: () => CookieInformation.submitAllCategories() || true,
|
|
375
|
+
// turn the single-button form into a decline submission, same fields as the CMP's own decline form
|
|
376
|
+
EVAL_EE_CONSENT_DECLINE_0: () => document.querySelectorAll('#cookieConsentFormAccept input[name^="ee:cookies_"]').forEach((i) => i.value = "n") || true,
|
|
373
377
|
EVAL_ETSY_0: () => document.querySelectorAll(".gdpr-overlay-body input").forEach((toggle) => {
|
|
374
378
|
toggle.checked = false;
|
|
375
379
|
}) || true,
|
|
@@ -456,7 +460,8 @@ var snippets = {
|
|
|
456
460
|
EVAL_USERCENTRICS_API_5: () => UC_UI.areAllConsentsAccepted() === true,
|
|
457
461
|
EVAL_USERCENTRICS_API_6: () => UC_UI.areAllConsentsAccepted() === false,
|
|
458
462
|
EVAL_USERCENTRICS_BUTTON_0: () => JSON.parse(localStorage.getItem("usercentrics")).consents.every((c) => c.isEssential || !c.consentStatus),
|
|
459
|
-
EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll("label[id$=cookies-deny-label]")).forEach((e) => e.click()) || true
|
|
463
|
+
EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll("label[id$=cookies-deny-label]")).forEach((e) => e.click()) || true,
|
|
464
|
+
EVAL_WBD_LTP_CLOSE: () => document.querySelector("dialog#ltp-dialog").close() || true
|
|
460
465
|
};
|
|
461
466
|
function getFunctionBody(snippetFunc) {
|
|
462
467
|
const snippetStr = snippetFunc.toString();
|
|
@@ -472,7 +477,8 @@ var DETECT_PATTERNS = [
|
|
|
472
477
|
// "only necessary" is probably too broad
|
|
473
478
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
474
479
|
/(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi,
|
|
475
|
-
|
|
480
|
+
// a single qualifier is common: "optional", "essential", "necessary", "analytics", ...
|
|
481
|
+
/we (?:use|serve)(?: \w+)? cookies/gi,
|
|
476
482
|
/we are using cookies/gi,
|
|
477
483
|
/use of cookies/gi,
|
|
478
484
|
/website uses cookies to enhance your browsing experience/gi,
|
|
@@ -616,7 +622,10 @@ var DETECT_PATTERNS = [
|
|
|
616
622
|
// "файлы cookie" / "cookie-файлы" / "куки-файлы" in any phrasing
|
|
617
623
|
/(?:файл[а-яё]*[\s-]+(?:cookie|куки)|(?:cookie|куки)[\s-]+файл[а-яё]*)/gi,
|
|
618
624
|
// Italian (IT)
|
|
619
|
-
/usiamo.{0,20}cookie/gi
|
|
625
|
+
/usiamo.{0,20}cookie/gi,
|
|
626
|
+
// Japanese (JA)
|
|
627
|
+
// e.g. "当サイトはCookieを使用しています", "クッキー(Cookie)を利用しています"
|
|
628
|
+
/(?:cookie|クッキー).{0,10}を(?:使用|利用)/gi
|
|
620
629
|
];
|
|
621
630
|
var REJECT_PATTERNS_ENGLISH = [
|
|
622
631
|
// e.g. "reject", "reject all", "reject all cookies", "deny all", "refuse cookies", "decline",
|
|
@@ -628,12 +637,12 @@ var REJECT_PATTERNS_ENGLISH = [
|
|
|
628
637
|
// e.g. "continue without accepting", "continue without agreeing", "continue without agreeing →"
|
|
629
638
|
/^\s*(continue|proceed|continue\s+browsing)\s+without\s+(accepting|agreeing|consent|cookies|tracking)(\s*→)?\s*$/is,
|
|
630
639
|
// essential/necessary/functional-only, e.g. "essential cookies only", "accept only essential cookies",
|
|
631
|
-
// "allow necessary cookies continue", "use essential cookies only", "functional only", "i confirm necessary"
|
|
640
|
+
// "allow necessary cookies continue", "use essential cookies only", "functional only", "essential only cookies", "i confirm necessary"
|
|
632
641
|
/^\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,
|
|
633
642
|
/^\s*(i\s+)?(want\s+to\s+)?only\s+(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s*(cookies)?\s*(continue|only)?\s*$/is,
|
|
634
|
-
/^\s*(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s
|
|
635
|
-
// e.g. "do not sell or share my personal information", "opt out of sale ..." (CCPA)
|
|
636
|
-
/do\s+not\s+sell|opt\s+out\s+of\s+sale/is,
|
|
643
|
+
/^\s*(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s+((cookies\s+)?only|only\s+cookies)\s*$/is,
|
|
644
|
+
// e.g. "do not sell or share my personal information", "do not share my personal information", "opt out of sale ..." (CCPA)
|
|
645
|
+
/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,
|
|
637
646
|
// e.g. "opt-out of sale/share or targeted advertising", "opt-out of advertising/social media cookies"
|
|
638
647
|
/^opt[ -]?out of /is,
|
|
639
648
|
// e.g. "reject all except strictly necessary", "reject all (except necessary cookies)"
|
|
@@ -780,6 +789,12 @@ var REJECT_PATTERNS_RUSSIAN = [
|
|
|
780
789
|
];
|
|
781
790
|
var REJECT_PATTERNS_TURKISH = ["reddet", "\xE7erezleri reddet"];
|
|
782
791
|
var REJECT_PATTERNS_INDONESIAN = ["tolak cookie"];
|
|
792
|
+
var REJECT_PATTERNS_JAPANESE = [
|
|
793
|
+
// e.g. "拒否", "すべて拒否", "全て拒否する", "cookieを拒否"
|
|
794
|
+
/^(すべて|全て)?\s?(の)?(cookie|クッキー)?\s?(を)?拒否(する)?$/i,
|
|
795
|
+
"\u540C\u610F\u3057\u306A\u3044",
|
|
796
|
+
"\u540C\u610F\u3057\u307E\u305B\u3093"
|
|
797
|
+
];
|
|
783
798
|
var REJECT_PATTERNS = [
|
|
784
799
|
...REJECT_PATTERNS_ENGLISH,
|
|
785
800
|
...REJECT_PATTERNS_DUTCH,
|
|
@@ -797,7 +812,8 @@ var REJECT_PATTERNS = [
|
|
|
797
812
|
...REJECT_PATTERNS_POLISH,
|
|
798
813
|
...REJECT_PATTERNS_RUSSIAN,
|
|
799
814
|
...REJECT_PATTERNS_TURKISH,
|
|
800
|
-
...REJECT_PATTERNS_INDONESIAN
|
|
815
|
+
...REJECT_PATTERNS_INDONESIAN,
|
|
816
|
+
...REJECT_PATTERNS_JAPANESE
|
|
801
817
|
];
|
|
802
818
|
var BUTTON_NEVER_MATCH_PATTERNS = [
|
|
803
819
|
/pay|subscribe/is,
|
|
@@ -1008,12 +1024,12 @@ var ACCEPT_PATTERNS = [
|
|
|
1008
1024
|
/^(?!.*\b(essential|necessary|required|functional|minimal|reject|deny|refuse|decline|only|dismiss)\b)(?!.*all cookies continue)(yes,?\s+)?(i\s+)?(accept|agree|allow|consent|enable)(\s+(to\s+)?(all( cookies)?|cookies|selection|selected( cookies)?|everything|recommended( cookies| settings)?|optional( cookies)?|additional cookies|analytics cookies))?(\s+(and\s+)?(continue|close|proceed|save))?\s*$/is,
|
|
1009
1025
|
/^continue (and accept|using cookies|with (all|recommended cookies|cookies))$/is,
|
|
1010
1026
|
// DE accept verbs
|
|
1011
|
-
/^(alle[sn]?\s+|allem\s+|ich\s+|cookies\s+|ausgewählte\s+|webanalyse\s+)?(cookies?\s+)?(akzeptieren|annehmen|zustimmen|zulassen|erlauben|einwilligen|aktivieren|auswählen)(\s+(und\s+)?(weiter|
|
|
1027
|
+
/^(alle[sn]?\s+|allem\s+|ich\s+|cookies\s+|ausgewählte\s+|webanalyse\s+)?(cookies?\s+)?(akzeptieren|annehmen|zustimmen|zulassen|erlauben|einwilligen|aktivieren|auswählen)(\s+(und\s+)?(weiter|schlie(ß|ss)en))?\s*$/is,
|
|
1012
1028
|
/^((meine\s+)?auswahl|alle)\s+(bestätigen|akzeptieren|auswählen)$/is,
|
|
1013
1029
|
/^(alle[nm]?\s+)?(zustimmen|einverstanden|einwilligung|zustimmung)$/is,
|
|
1014
1030
|
/^ich (bin einverstanden|akzeptiere( alle)?|stimme zu)$/is,
|
|
1015
1031
|
// NL accept verbs
|
|
1016
|
-
/^(ja,?\s+)?(alle[s]?\s+|ik\s+)?(cookies?\s+)?(accepteer|accepteren|toestaan|aanvaard|aanvaarden|ga akkoord|akkoord)(\s+(en\s+
|
|
1032
|
+
/^(ja,?\s+)?(alle[s]?\s+|ik\s+)?(cookies?\s+)?(accepteer|accepteren|toestaan|aanvaard|aanvaarden|ga akkoord|akkoord)(\s+((en\s+)?sluiten|en\s+(doorgaan|verdergaan)|cookies|alle))?\s*$/is,
|
|
1017
1033
|
/^(selectie (accepteren|toestaan)|accepteer (selectie|alle)|alle (toestaan|accepteren|aanvaarden)|ja, (dat is prima|prima|alles toestaan|accepteren|ik accepteer cookies|ik ga akkoord)|is goed)$/is,
|
|
1018
1034
|
// FR accept verbs
|
|
1019
1035
|
/^(oui,?\s+)?(je\s+)?(tout\s+)?(accepter|jaccepte|autoriser)(\s+(tout|tous les (cookies|témoins)|les (cookies|témoins)|la sélection|et (continuer|fermer|poursuivre)))?\s*$/is,
|
|
@@ -1152,10 +1168,7 @@ var ACKNOWLEDGE_PATTERNS = [
|
|
|
1152
1168
|
/^close (banner|cookie notification)$/is,
|
|
1153
1169
|
/understood$/is,
|
|
1154
1170
|
"confirm my choices",
|
|
1155
|
-
// French (FR)
|
|
1156
|
-
"accepter fermer",
|
|
1157
1171
|
// German (DE)
|
|
1158
|
-
"akzeptieren schlie\xDFen",
|
|
1159
1172
|
"speichern schlie\xDFen",
|
|
1160
1173
|
// Spanish (ES)
|
|
1161
1174
|
/^.?( lo)?(entendido|entiendo).?$/s,
|
package/dist/autoconsent.esm.js
CHANGED
|
@@ -317,6 +317,8 @@ var snippets = {
|
|
|
317
317
|
).consents.statistics,
|
|
318
318
|
EVAL_CC_BANNER2_0: () => !!document.cookie.match(/sncc=[^;]+D%3Dtrue/),
|
|
319
319
|
EVAL_COINBASE_0: () => JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent.length <= 1,
|
|
320
|
+
// the close icon is an SVG, which has no click() method
|
|
321
|
+
EVAL_COOKIE_POPUP_CLOSE: () => document.querySelector("#cookie-popup #close-cookies").dispatchEvent(new MouseEvent("click", { bubbles: true })) || true,
|
|
320
322
|
EVAL_COOKIE_LAW_INFO_0: () => {
|
|
321
323
|
if (CLI.disableAllCookies) CLI.disableAllCookies();
|
|
322
324
|
if (CLI.reject_close) CLI.reject_close();
|
|
@@ -340,6 +342,8 @@ var snippets = {
|
|
|
340
342
|
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,
|
|
341
343
|
EVAL_COOKIEINFORMATION_0: () => CookieInformation.declineAllCategories() || true,
|
|
342
344
|
EVAL_COOKIEINFORMATION_1: () => CookieInformation.submitAllCategories() || true,
|
|
345
|
+
// turn the single-button form into a decline submission, same fields as the CMP's own decline form
|
|
346
|
+
EVAL_EE_CONSENT_DECLINE_0: () => document.querySelectorAll('#cookieConsentFormAccept input[name^="ee:cookies_"]').forEach((i) => i.value = "n") || true,
|
|
343
347
|
EVAL_ETSY_0: () => document.querySelectorAll(".gdpr-overlay-body input").forEach((toggle) => {
|
|
344
348
|
toggle.checked = false;
|
|
345
349
|
}) || true,
|
|
@@ -426,7 +430,8 @@ var snippets = {
|
|
|
426
430
|
EVAL_USERCENTRICS_API_5: () => UC_UI.areAllConsentsAccepted() === true,
|
|
427
431
|
EVAL_USERCENTRICS_API_6: () => UC_UI.areAllConsentsAccepted() === false,
|
|
428
432
|
EVAL_USERCENTRICS_BUTTON_0: () => JSON.parse(localStorage.getItem("usercentrics")).consents.every((c) => c.isEssential || !c.consentStatus),
|
|
429
|
-
EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll("label[id$=cookies-deny-label]")).forEach((e) => e.click()) || true
|
|
433
|
+
EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll("label[id$=cookies-deny-label]")).forEach((e) => e.click()) || true,
|
|
434
|
+
EVAL_WBD_LTP_CLOSE: () => document.querySelector("dialog#ltp-dialog").close() || true
|
|
430
435
|
};
|
|
431
436
|
function getFunctionBody(snippetFunc) {
|
|
432
437
|
const snippetStr = snippetFunc.toString();
|
|
@@ -442,7 +447,8 @@ var DETECT_PATTERNS = [
|
|
|
442
447
|
// "only necessary" is probably too broad
|
|
443
448
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
444
449
|
/(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi,
|
|
445
|
-
|
|
450
|
+
// a single qualifier is common: "optional", "essential", "necessary", "analytics", ...
|
|
451
|
+
/we (?:use|serve)(?: \w+)? cookies/gi,
|
|
446
452
|
/we are using cookies/gi,
|
|
447
453
|
/use of cookies/gi,
|
|
448
454
|
/website uses cookies to enhance your browsing experience/gi,
|
|
@@ -586,7 +592,10 @@ var DETECT_PATTERNS = [
|
|
|
586
592
|
// "файлы cookie" / "cookie-файлы" / "куки-файлы" in any phrasing
|
|
587
593
|
/(?:файл[а-яё]*[\s-]+(?:cookie|куки)|(?:cookie|куки)[\s-]+файл[а-яё]*)/gi,
|
|
588
594
|
// Italian (IT)
|
|
589
|
-
/usiamo.{0,20}cookie/gi
|
|
595
|
+
/usiamo.{0,20}cookie/gi,
|
|
596
|
+
// Japanese (JA)
|
|
597
|
+
// e.g. "当サイトはCookieを使用しています", "クッキー(Cookie)を利用しています"
|
|
598
|
+
/(?:cookie|クッキー).{0,10}を(?:使用|利用)/gi
|
|
590
599
|
];
|
|
591
600
|
var REJECT_PATTERNS_ENGLISH = [
|
|
592
601
|
// e.g. "reject", "reject all", "reject all cookies", "deny all", "refuse cookies", "decline",
|
|
@@ -598,12 +607,12 @@ var REJECT_PATTERNS_ENGLISH = [
|
|
|
598
607
|
// e.g. "continue without accepting", "continue without agreeing", "continue without agreeing →"
|
|
599
608
|
/^\s*(continue|proceed|continue\s+browsing)\s+without\s+(accepting|agreeing|consent|cookies|tracking)(\s*→)?\s*$/is,
|
|
600
609
|
// essential/necessary/functional-only, e.g. "essential cookies only", "accept only essential cookies",
|
|
601
|
-
// "allow necessary cookies continue", "use essential cookies only", "functional only", "i confirm necessary"
|
|
610
|
+
// "allow necessary cookies continue", "use essential cookies only", "functional only", "essential only cookies", "i confirm necessary"
|
|
602
611
|
/^\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,
|
|
603
612
|
/^\s*(i\s+)?(want\s+to\s+)?only\s+(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s*(cookies)?\s*(continue|only)?\s*$/is,
|
|
604
|
-
/^\s*(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s
|
|
605
|
-
// e.g. "do not sell or share my personal information", "opt out of sale ..." (CCPA)
|
|
606
|
-
/do\s+not\s+sell|opt\s+out\s+of\s+sale/is,
|
|
613
|
+
/^\s*(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s+((cookies\s+)?only|only\s+cookies)\s*$/is,
|
|
614
|
+
// e.g. "do not sell or share my personal information", "do not share my personal information", "opt out of sale ..." (CCPA)
|
|
615
|
+
/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,
|
|
607
616
|
// e.g. "opt-out of sale/share or targeted advertising", "opt-out of advertising/social media cookies"
|
|
608
617
|
/^opt[ -]?out of /is,
|
|
609
618
|
// e.g. "reject all except strictly necessary", "reject all (except necessary cookies)"
|
|
@@ -750,6 +759,12 @@ var REJECT_PATTERNS_RUSSIAN = [
|
|
|
750
759
|
];
|
|
751
760
|
var REJECT_PATTERNS_TURKISH = ["reddet", "\xE7erezleri reddet"];
|
|
752
761
|
var REJECT_PATTERNS_INDONESIAN = ["tolak cookie"];
|
|
762
|
+
var REJECT_PATTERNS_JAPANESE = [
|
|
763
|
+
// e.g. "拒否", "すべて拒否", "全て拒否する", "cookieを拒否"
|
|
764
|
+
/^(すべて|全て)?\s?(の)?(cookie|クッキー)?\s?(を)?拒否(する)?$/i,
|
|
765
|
+
"\u540C\u610F\u3057\u306A\u3044",
|
|
766
|
+
"\u540C\u610F\u3057\u307E\u305B\u3093"
|
|
767
|
+
];
|
|
753
768
|
var REJECT_PATTERNS = [
|
|
754
769
|
...REJECT_PATTERNS_ENGLISH,
|
|
755
770
|
...REJECT_PATTERNS_DUTCH,
|
|
@@ -767,7 +782,8 @@ var REJECT_PATTERNS = [
|
|
|
767
782
|
...REJECT_PATTERNS_POLISH,
|
|
768
783
|
...REJECT_PATTERNS_RUSSIAN,
|
|
769
784
|
...REJECT_PATTERNS_TURKISH,
|
|
770
|
-
...REJECT_PATTERNS_INDONESIAN
|
|
785
|
+
...REJECT_PATTERNS_INDONESIAN,
|
|
786
|
+
...REJECT_PATTERNS_JAPANESE
|
|
771
787
|
];
|
|
772
788
|
var BUTTON_NEVER_MATCH_PATTERNS = [
|
|
773
789
|
/pay|subscribe/is,
|
|
@@ -978,12 +994,12 @@ var ACCEPT_PATTERNS = [
|
|
|
978
994
|
/^(?!.*\b(essential|necessary|required|functional|minimal|reject|deny|refuse|decline|only|dismiss)\b)(?!.*all cookies continue)(yes,?\s+)?(i\s+)?(accept|agree|allow|consent|enable)(\s+(to\s+)?(all( cookies)?|cookies|selection|selected( cookies)?|everything|recommended( cookies| settings)?|optional( cookies)?|additional cookies|analytics cookies))?(\s+(and\s+)?(continue|close|proceed|save))?\s*$/is,
|
|
979
995
|
/^continue (and accept|using cookies|with (all|recommended cookies|cookies))$/is,
|
|
980
996
|
// DE accept verbs
|
|
981
|
-
/^(alle[sn]?\s+|allem\s+|ich\s+|cookies\s+|ausgewählte\s+|webanalyse\s+)?(cookies?\s+)?(akzeptieren|annehmen|zustimmen|zulassen|erlauben|einwilligen|aktivieren|auswählen)(\s+(und\s+)?(weiter|
|
|
997
|
+
/^(alle[sn]?\s+|allem\s+|ich\s+|cookies\s+|ausgewählte\s+|webanalyse\s+)?(cookies?\s+)?(akzeptieren|annehmen|zustimmen|zulassen|erlauben|einwilligen|aktivieren|auswählen)(\s+(und\s+)?(weiter|schlie(ß|ss)en))?\s*$/is,
|
|
982
998
|
/^((meine\s+)?auswahl|alle)\s+(bestätigen|akzeptieren|auswählen)$/is,
|
|
983
999
|
/^(alle[nm]?\s+)?(zustimmen|einverstanden|einwilligung|zustimmung)$/is,
|
|
984
1000
|
/^ich (bin einverstanden|akzeptiere( alle)?|stimme zu)$/is,
|
|
985
1001
|
// NL accept verbs
|
|
986
|
-
/^(ja,?\s+)?(alle[s]?\s+|ik\s+)?(cookies?\s+)?(accepteer|accepteren|toestaan|aanvaard|aanvaarden|ga akkoord|akkoord)(\s+(en\s+
|
|
1002
|
+
/^(ja,?\s+)?(alle[s]?\s+|ik\s+)?(cookies?\s+)?(accepteer|accepteren|toestaan|aanvaard|aanvaarden|ga akkoord|akkoord)(\s+((en\s+)?sluiten|en\s+(doorgaan|verdergaan)|cookies|alle))?\s*$/is,
|
|
987
1003
|
/^(selectie (accepteren|toestaan)|accepteer (selectie|alle)|alle (toestaan|accepteren|aanvaarden)|ja, (dat is prima|prima|alles toestaan|accepteren|ik accepteer cookies|ik ga akkoord)|is goed)$/is,
|
|
988
1004
|
// FR accept verbs
|
|
989
1005
|
/^(oui,?\s+)?(je\s+)?(tout\s+)?(accepter|jaccepte|autoriser)(\s+(tout|tous les (cookies|témoins)|les (cookies|témoins)|la sélection|et (continuer|fermer|poursuivre)))?\s*$/is,
|
|
@@ -1122,10 +1138,7 @@ var ACKNOWLEDGE_PATTERNS = [
|
|
|
1122
1138
|
/^close (banner|cookie notification)$/is,
|
|
1123
1139
|
/understood$/is,
|
|
1124
1140
|
"confirm my choices",
|
|
1125
|
-
// French (FR)
|
|
1126
|
-
"accepter fermer",
|
|
1127
1141
|
// German (DE)
|
|
1128
|
-
"akzeptieren schlie\xDFen",
|
|
1129
1142
|
"speichern schlie\xDFen",
|
|
1130
1143
|
// Spanish (ES)
|
|
1131
1144
|
/^.?( lo)?(entendido|entiendo).?$/s,
|
|
@@ -319,6 +319,8 @@
|
|
|
319
319
|
).consents.statistics,
|
|
320
320
|
EVAL_CC_BANNER2_0: () => !!document.cookie.match(/sncc=[^;]+D%3Dtrue/),
|
|
321
321
|
EVAL_COINBASE_0: () => JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent.length <= 1,
|
|
322
|
+
// the close icon is an SVG, which has no click() method
|
|
323
|
+
EVAL_COOKIE_POPUP_CLOSE: () => document.querySelector("#cookie-popup #close-cookies").dispatchEvent(new MouseEvent("click", { bubbles: true })) || true,
|
|
322
324
|
EVAL_COOKIE_LAW_INFO_0: () => {
|
|
323
325
|
if (CLI.disableAllCookies) CLI.disableAllCookies();
|
|
324
326
|
if (CLI.reject_close) CLI.reject_close();
|
|
@@ -342,6 +344,8 @@
|
|
|
342
344
|
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,
|
|
343
345
|
EVAL_COOKIEINFORMATION_0: () => CookieInformation.declineAllCategories() || true,
|
|
344
346
|
EVAL_COOKIEINFORMATION_1: () => CookieInformation.submitAllCategories() || true,
|
|
347
|
+
// turn the single-button form into a decline submission, same fields as the CMP's own decline form
|
|
348
|
+
EVAL_EE_CONSENT_DECLINE_0: () => document.querySelectorAll('#cookieConsentFormAccept input[name^="ee:cookies_"]').forEach((i) => i.value = "n") || true,
|
|
345
349
|
EVAL_ETSY_0: () => document.querySelectorAll(".gdpr-overlay-body input").forEach((toggle) => {
|
|
346
350
|
toggle.checked = false;
|
|
347
351
|
}) || true,
|
|
@@ -428,7 +432,8 @@
|
|
|
428
432
|
EVAL_USERCENTRICS_API_5: () => UC_UI.areAllConsentsAccepted() === true,
|
|
429
433
|
EVAL_USERCENTRICS_API_6: () => UC_UI.areAllConsentsAccepted() === false,
|
|
430
434
|
EVAL_USERCENTRICS_BUTTON_0: () => JSON.parse(localStorage.getItem("usercentrics")).consents.every((c) => c.isEssential || !c.consentStatus),
|
|
431
|
-
EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll("label[id$=cookies-deny-label]")).forEach((e) => e.click()) || true
|
|
435
|
+
EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll("label[id$=cookies-deny-label]")).forEach((e) => e.click()) || true,
|
|
436
|
+
EVAL_WBD_LTP_CLOSE: () => document.querySelector("dialog#ltp-dialog").close() || true
|
|
432
437
|
};
|
|
433
438
|
function getFunctionBody(snippetFunc) {
|
|
434
439
|
const snippetStr = snippetFunc.toString();
|
|
@@ -444,7 +449,8 @@
|
|
|
444
449
|
// "only necessary" is probably too broad
|
|
445
450
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
446
451
|
/(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi,
|
|
447
|
-
|
|
452
|
+
// a single qualifier is common: "optional", "essential", "necessary", "analytics", ...
|
|
453
|
+
/we (?:use|serve)(?: \w+)? cookies/gi,
|
|
448
454
|
/we are using cookies/gi,
|
|
449
455
|
/use of cookies/gi,
|
|
450
456
|
/website uses cookies to enhance your browsing experience/gi,
|
|
@@ -588,7 +594,10 @@
|
|
|
588
594
|
// "файлы cookie" / "cookie-файлы" / "куки-файлы" in any phrasing
|
|
589
595
|
/(?:файл[а-яё]*[\s-]+(?:cookie|куки)|(?:cookie|куки)[\s-]+файл[а-яё]*)/gi,
|
|
590
596
|
// Italian (IT)
|
|
591
|
-
/usiamo.{0,20}cookie/gi
|
|
597
|
+
/usiamo.{0,20}cookie/gi,
|
|
598
|
+
// Japanese (JA)
|
|
599
|
+
// e.g. "当サイトはCookieを使用しています", "クッキー(Cookie)を利用しています"
|
|
600
|
+
/(?:cookie|クッキー).{0,10}を(?:使用|利用)/gi
|
|
592
601
|
];
|
|
593
602
|
var REJECT_PATTERNS_ENGLISH = [
|
|
594
603
|
// e.g. "reject", "reject all", "reject all cookies", "deny all", "refuse cookies", "decline",
|
|
@@ -600,12 +609,12 @@
|
|
|
600
609
|
// e.g. "continue without accepting", "continue without agreeing", "continue without agreeing →"
|
|
601
610
|
/^\s*(continue|proceed|continue\s+browsing)\s+without\s+(accepting|agreeing|consent|cookies|tracking)(\s*→)?\s*$/is,
|
|
602
611
|
// essential/necessary/functional-only, e.g. "essential cookies only", "accept only essential cookies",
|
|
603
|
-
// "allow necessary cookies continue", "use essential cookies only", "functional only", "i confirm necessary"
|
|
612
|
+
// "allow necessary cookies continue", "use essential cookies only", "functional only", "essential only cookies", "i confirm necessary"
|
|
604
613
|
/^\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,
|
|
605
614
|
/^\s*(i\s+)?(want\s+to\s+)?only\s+(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s*(cookies)?\s*(continue|only)?\s*$/is,
|
|
606
|
-
/^\s*(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s
|
|
607
|
-
// e.g. "do not sell or share my personal information", "opt out of sale ..." (CCPA)
|
|
608
|
-
/do\s+not\s+sell|opt\s+out\s+of\s+sale/is,
|
|
615
|
+
/^\s*(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s+((cookies\s+)?only|only\s+cookies)\s*$/is,
|
|
616
|
+
// e.g. "do not sell or share my personal information", "do not share my personal information", "opt out of sale ..." (CCPA)
|
|
617
|
+
/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,
|
|
609
618
|
// e.g. "opt-out of sale/share or targeted advertising", "opt-out of advertising/social media cookies"
|
|
610
619
|
/^opt[ -]?out of /is,
|
|
611
620
|
// e.g. "reject all except strictly necessary", "reject all (except necessary cookies)"
|
|
@@ -752,6 +761,12 @@
|
|
|
752
761
|
];
|
|
753
762
|
var REJECT_PATTERNS_TURKISH = ["reddet", "\xE7erezleri reddet"];
|
|
754
763
|
var REJECT_PATTERNS_INDONESIAN = ["tolak cookie"];
|
|
764
|
+
var REJECT_PATTERNS_JAPANESE = [
|
|
765
|
+
// e.g. "拒否", "すべて拒否", "全て拒否する", "cookieを拒否"
|
|
766
|
+
/^(すべて|全て)?\s?(の)?(cookie|クッキー)?\s?(を)?拒否(する)?$/i,
|
|
767
|
+
"\u540C\u610F\u3057\u306A\u3044",
|
|
768
|
+
"\u540C\u610F\u3057\u307E\u305B\u3093"
|
|
769
|
+
];
|
|
755
770
|
var REJECT_PATTERNS = [
|
|
756
771
|
...REJECT_PATTERNS_ENGLISH,
|
|
757
772
|
...REJECT_PATTERNS_DUTCH,
|
|
@@ -769,7 +784,8 @@
|
|
|
769
784
|
...REJECT_PATTERNS_POLISH,
|
|
770
785
|
...REJECT_PATTERNS_RUSSIAN,
|
|
771
786
|
...REJECT_PATTERNS_TURKISH,
|
|
772
|
-
...REJECT_PATTERNS_INDONESIAN
|
|
787
|
+
...REJECT_PATTERNS_INDONESIAN,
|
|
788
|
+
...REJECT_PATTERNS_JAPANESE
|
|
773
789
|
];
|
|
774
790
|
var BUTTON_NEVER_MATCH_PATTERNS = [
|
|
775
791
|
/pay|subscribe/is,
|
|
@@ -980,12 +996,12 @@
|
|
|
980
996
|
/^(?!.*\b(essential|necessary|required|functional|minimal|reject|deny|refuse|decline|only|dismiss)\b)(?!.*all cookies continue)(yes,?\s+)?(i\s+)?(accept|agree|allow|consent|enable)(\s+(to\s+)?(all( cookies)?|cookies|selection|selected( cookies)?|everything|recommended( cookies| settings)?|optional( cookies)?|additional cookies|analytics cookies))?(\s+(and\s+)?(continue|close|proceed|save))?\s*$/is,
|
|
981
997
|
/^continue (and accept|using cookies|with (all|recommended cookies|cookies))$/is,
|
|
982
998
|
// DE accept verbs
|
|
983
|
-
/^(alle[sn]?\s+|allem\s+|ich\s+|cookies\s+|ausgewählte\s+|webanalyse\s+)?(cookies?\s+)?(akzeptieren|annehmen|zustimmen|zulassen|erlauben|einwilligen|aktivieren|auswählen)(\s+(und\s+)?(weiter|
|
|
999
|
+
/^(alle[sn]?\s+|allem\s+|ich\s+|cookies\s+|ausgewählte\s+|webanalyse\s+)?(cookies?\s+)?(akzeptieren|annehmen|zustimmen|zulassen|erlauben|einwilligen|aktivieren|auswählen)(\s+(und\s+)?(weiter|schlie(ß|ss)en))?\s*$/is,
|
|
984
1000
|
/^((meine\s+)?auswahl|alle)\s+(bestätigen|akzeptieren|auswählen)$/is,
|
|
985
1001
|
/^(alle[nm]?\s+)?(zustimmen|einverstanden|einwilligung|zustimmung)$/is,
|
|
986
1002
|
/^ich (bin einverstanden|akzeptiere( alle)?|stimme zu)$/is,
|
|
987
1003
|
// NL accept verbs
|
|
988
|
-
/^(ja,?\s+)?(alle[s]?\s+|ik\s+)?(cookies?\s+)?(accepteer|accepteren|toestaan|aanvaard|aanvaarden|ga akkoord|akkoord)(\s+(en\s+
|
|
1004
|
+
/^(ja,?\s+)?(alle[s]?\s+|ik\s+)?(cookies?\s+)?(accepteer|accepteren|toestaan|aanvaard|aanvaarden|ga akkoord|akkoord)(\s+((en\s+)?sluiten|en\s+(doorgaan|verdergaan)|cookies|alle))?\s*$/is,
|
|
989
1005
|
/^(selectie (accepteren|toestaan)|accepteer (selectie|alle)|alle (toestaan|accepteren|aanvaarden)|ja, (dat is prima|prima|alles toestaan|accepteren|ik accepteer cookies|ik ga akkoord)|is goed)$/is,
|
|
990
1006
|
// FR accept verbs
|
|
991
1007
|
/^(oui,?\s+)?(je\s+)?(tout\s+)?(accepter|jaccepte|autoriser)(\s+(tout|tous les (cookies|témoins)|les (cookies|témoins)|la sélection|et (continuer|fermer|poursuivre)))?\s*$/is,
|
|
@@ -1124,10 +1140,7 @@
|
|
|
1124
1140
|
/^close (banner|cookie notification)$/is,
|
|
1125
1141
|
/understood$/is,
|
|
1126
1142
|
"confirm my choices",
|
|
1127
|
-
// French (FR)
|
|
1128
|
-
"accepter fermer",
|
|
1129
1143
|
// German (DE)
|
|
1130
|
-
"akzeptieren schlie\xDFen",
|
|
1131
1144
|
"speichern schlie\xDFen",
|
|
1132
1145
|
// Spanish (ES)
|
|
1133
1146
|
/^.?( lo)?(entendido|entiendo).?$/s,
|