@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
|
@@ -311,6 +311,8 @@
|
|
|
311
311
|
).consents.statistics,
|
|
312
312
|
EVAL_CC_BANNER2_0: () => !!document.cookie.match(/sncc=[^;]+D%3Dtrue/),
|
|
313
313
|
EVAL_COINBASE_0: () => JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent.length <= 1,
|
|
314
|
+
// the close icon is an SVG, which has no click() method
|
|
315
|
+
EVAL_COOKIE_POPUP_CLOSE: () => document.querySelector("#cookie-popup #close-cookies").dispatchEvent(new MouseEvent("click", { bubbles: true })) || true,
|
|
314
316
|
EVAL_COOKIE_LAW_INFO_0: () => {
|
|
315
317
|
if (CLI.disableAllCookies) CLI.disableAllCookies();
|
|
316
318
|
if (CLI.reject_close) CLI.reject_close();
|
|
@@ -334,6 +336,8 @@
|
|
|
334
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,
|
|
335
337
|
EVAL_COOKIEINFORMATION_0: () => CookieInformation.declineAllCategories() || true,
|
|
336
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,
|
|
337
341
|
EVAL_ETSY_0: () => document.querySelectorAll(".gdpr-overlay-body input").forEach((toggle) => {
|
|
338
342
|
toggle.checked = false;
|
|
339
343
|
}) || true,
|
|
@@ -420,7 +424,8 @@
|
|
|
420
424
|
EVAL_USERCENTRICS_API_5: () => UC_UI.areAllConsentsAccepted() === true,
|
|
421
425
|
EVAL_USERCENTRICS_API_6: () => UC_UI.areAllConsentsAccepted() === false,
|
|
422
426
|
EVAL_USERCENTRICS_BUTTON_0: () => JSON.parse(localStorage.getItem("usercentrics")).consents.every((c) => c.isEssential || !c.consentStatus),
|
|
423
|
-
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
|
|
424
429
|
};
|
|
425
430
|
function getFunctionBody(snippetFunc) {
|
|
426
431
|
const snippetStr = snippetFunc.toString();
|
|
@@ -436,7 +441,8 @@
|
|
|
436
441
|
// "only necessary" is probably too broad
|
|
437
442
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
438
443
|
/(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi,
|
|
439
|
-
|
|
444
|
+
// a single qualifier is common: "optional", "essential", "necessary", "analytics", ...
|
|
445
|
+
/we (?:use|serve)(?: \w+)? cookies/gi,
|
|
440
446
|
/we are using cookies/gi,
|
|
441
447
|
/use of cookies/gi,
|
|
442
448
|
/website uses cookies to enhance your browsing experience/gi,
|
|
@@ -580,7 +586,10 @@
|
|
|
580
586
|
// "файлы cookie" / "cookie-файлы" / "куки-файлы" in any phrasing
|
|
581
587
|
/(?:файл[а-яё]*[\s-]+(?:cookie|куки)|(?:cookie|куки)[\s-]+файл[а-яё]*)/gi,
|
|
582
588
|
// Italian (IT)
|
|
583
|
-
/usiamo.{0,20}cookie/gi
|
|
589
|
+
/usiamo.{0,20}cookie/gi,
|
|
590
|
+
// Japanese (JA)
|
|
591
|
+
// e.g. "当サイトはCookieを使用しています", "クッキー(Cookie)を利用しています"
|
|
592
|
+
/(?:cookie|クッキー).{0,10}を(?:使用|利用)/gi
|
|
584
593
|
];
|
|
585
594
|
var REJECT_PATTERNS_ENGLISH = [
|
|
586
595
|
// e.g. "reject", "reject all", "reject all cookies", "deny all", "refuse cookies", "decline",
|
|
@@ -592,12 +601,12 @@
|
|
|
592
601
|
// e.g. "continue without accepting", "continue without agreeing", "continue without agreeing →"
|
|
593
602
|
/^\s*(continue|proceed|continue\s+browsing)\s+without\s+(accepting|agreeing|consent|cookies|tracking)(\s*→)?\s*$/is,
|
|
594
603
|
// essential/necessary/functional-only, e.g. "essential cookies only", "accept only essential cookies",
|
|
595
|
-
// "allow necessary cookies continue", "use essential cookies only", "functional only", "i confirm necessary"
|
|
604
|
+
// "allow necessary cookies continue", "use essential cookies only", "functional only", "essential only cookies", "i confirm necessary"
|
|
596
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,
|
|
597
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,
|
|
598
|
-
/^\s*(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s
|
|
599
|
-
// e.g. "do not sell or share my personal information", "opt out of sale ..." (CCPA)
|
|
600
|
-
/do\s+not\s+sell|opt\s+out\s+of\s+sale/is,
|
|
607
|
+
/^\s*(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s+((cookies\s+)?only|only\s+cookies)\s*$/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,
|
|
601
610
|
// e.g. "opt-out of sale/share or targeted advertising", "opt-out of advertising/social media cookies"
|
|
602
611
|
/^opt[ -]?out of /is,
|
|
603
612
|
// e.g. "reject all except strictly necessary", "reject all (except necessary cookies)"
|
|
@@ -744,6 +753,12 @@
|
|
|
744
753
|
];
|
|
745
754
|
var REJECT_PATTERNS_TURKISH = ["reddet", "\xE7erezleri reddet"];
|
|
746
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
|
+
];
|
|
747
762
|
var REJECT_PATTERNS = [
|
|
748
763
|
...REJECT_PATTERNS_ENGLISH,
|
|
749
764
|
...REJECT_PATTERNS_DUTCH,
|
|
@@ -761,7 +776,8 @@
|
|
|
761
776
|
...REJECT_PATTERNS_POLISH,
|
|
762
777
|
...REJECT_PATTERNS_RUSSIAN,
|
|
763
778
|
...REJECT_PATTERNS_TURKISH,
|
|
764
|
-
...REJECT_PATTERNS_INDONESIAN
|
|
779
|
+
...REJECT_PATTERNS_INDONESIAN,
|
|
780
|
+
...REJECT_PATTERNS_JAPANESE
|
|
765
781
|
];
|
|
766
782
|
var BUTTON_NEVER_MATCH_PATTERNS = [
|
|
767
783
|
/pay|subscribe/is,
|
|
@@ -972,12 +988,12 @@
|
|
|
972
988
|
/^(?!.*\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,
|
|
973
989
|
/^continue (and accept|using cookies|with (all|recommended cookies|cookies))$/is,
|
|
974
990
|
// DE accept verbs
|
|
975
|
-
/^(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|
|
|
991
|
+
/^(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,
|
|
976
992
|
/^((meine\s+)?auswahl|alle)\s+(bestätigen|akzeptieren|auswählen)$/is,
|
|
977
993
|
/^(alle[nm]?\s+)?(zustimmen|einverstanden|einwilligung|zustimmung)$/is,
|
|
978
994
|
/^ich (bin einverstanden|akzeptiere( alle)?|stimme zu)$/is,
|
|
979
995
|
// NL accept verbs
|
|
980
|
-
/^(ja,?\s+)?(alle[s]?\s+|ik\s+)?(cookies?\s+)?(accepteer|accepteren|toestaan|aanvaard|aanvaarden|ga akkoord|akkoord)(\s+(en\s+
|
|
996
|
+
/^(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,
|
|
981
997
|
/^(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,
|
|
982
998
|
// FR accept verbs
|
|
983
999
|
/^(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,
|
|
@@ -1116,10 +1132,7 @@
|
|
|
1116
1132
|
/^close (banner|cookie notification)$/is,
|
|
1117
1133
|
/understood$/is,
|
|
1118
1134
|
"confirm my choices",
|
|
1119
|
-
// French (FR)
|
|
1120
|
-
"accepter fermer",
|
|
1121
1135
|
// German (DE)
|
|
1122
|
-
"akzeptieren schlie\xDFen",
|
|
1123
1136
|
"speichern schlie\xDFen",
|
|
1124
1137
|
// Spanish (ES)
|
|
1125
1138
|
/^.?( lo)?(entendido|entiendo).?$/s,
|