@duckduckgo/autoconsent 17.4.0 → 18.1.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/ddg-release.yml +6 -3
- package/.prettierignore +1 -0
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +57 -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 +608 -61
- 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 +608 -61
- 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 +614 -67
- package/dist/autoconsent.esm.js +614 -67
- package/dist/autoconsent.playwright.js +608 -61
- package/dist/autoconsent.standalone.js +615 -68
- package/dist/heuristics.cjs.js +621 -52
- package/dist/heuristics.mjs +609 -50
- package/dist/types/cmps/tiktok.d.ts +0 -2
- package/dist/types/eval-snippets.d.ts +2 -0
- package/dist/types/heuristic-classify.d.ts +2 -6
- package/dist/types/heuristic-detect.d.ts +32 -0
- package/dist/types/heuristic-literals.d.ts +1 -0
- package/dist/types/heuristic-negatives.d.ts +25 -0
- package/dist/types/heuristic-patterns.d.ts +18 -2
- package/dist/types/heuristic-prefilter.d.ts +13 -0
- package/docs/heuristic-detection.md +78 -0
- package/docs/heuristic-prefilter.md +62 -0
- package/eslint.config.mjs +16 -1
- package/lib/cmps/evidon.ts +5 -4
- package/lib/cmps/tiktok.ts +0 -5
- package/lib/eval-snippets.ts +3 -0
- package/lib/heuristic-classify.ts +4 -39
- package/lib/heuristic-detect.ts +209 -0
- package/lib/heuristic-literals.ts +207 -0
- package/lib/heuristic-negatives.ts +173 -0
- package/lib/heuristic-patterns.ts +104 -31
- package/lib/heuristic-prefilter.ts +40 -0
- package/lib/heuristics.ts +8 -4
- package/lib/web.ts +1 -1
- package/package.json +2 -1
- package/rules/autoconsent/binogi.json +32 -0
- package/rules/autoconsent/bokio.json +32 -0
- package/rules/autoconsent/botble-cookie-consent.json +16 -0
- package/rules/autoconsent/calcolo-tools.json +23 -0
- package/rules/autoconsent/consilium-europa-eu.json +35 -0
- package/rules/autoconsent/dtu-findit.json +47 -0
- package/rules/autoconsent/hikvision.com.json +18 -0
- package/rules/autoconsent/hmgroup-turbocookie.json +18 -0
- package/rules/autoconsent/hmrc-tracking-consent.json +40 -0
- package/rules/autoconsent/hurra-consent.json +16 -0
- package/rules/autoconsent/isidewith.com.json +38 -0
- package/rules/autoconsent/landgate.json +10 -0
- package/rules/autoconsent/meta-cookie-dialog-v2.json +40 -0
- package/rules/autoconsent/pakamera.json +19 -0
- package/rules/autoconsent/purecookie-cosmetic.json +13 -0
- package/rules/autoconsent/random-org.json +41 -0
- package/rules/autoconsent/reverb-gdpr-nag.json +18 -0
- package/rules/autoconsent/reverb.json +24 -0
- package/rules/autoconsent/tallink.json +13 -0
- package/rules/autoconsent/tealium.json +4 -1
- package/rules/autoconsent/typo3-cookieconsent.json +9 -0
- package/rules/autoconsent/vinnies-org-au.json +29 -0
- package/rules/autoconsent/zoho.json +23 -0
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/scripts/build-heuristic-literals.ts +24 -0
- package/scripts/required-literals.ts +177 -0
- package/tests/binogi.spec.ts +3 -0
- package/tests/bokio.spec.ts +6 -0
- package/tests/botble-cookie-consent.spec.ts +11 -0
- package/tests/calcolo-tools.spec.ts +3 -0
- package/tests/consilium-europa-eu.spec.ts +3 -0
- package/tests/dtu-findit.spec.ts +3 -0
- package/tests/evidon.spec.ts +2 -1
- package/tests/hikvision.com.spec.ts +3 -0
- package/tests/hmgroup-turbocookie.spec.ts +7 -0
- package/tests/hmrc-tracking-consent.spec.ts +7 -0
- package/tests/hurra-consent.spec.ts +8 -0
- package/tests/isidewith.com.spec.ts +3 -0
- package/tests/landgate.spec.ts +3 -0
- package/tests/meta-cookie-dialog-v2.spec.ts +10 -0
- package/tests/pakamera.spec.ts +5 -0
- package/tests/purecookie-cosmetic.spec.ts +8 -0
- package/tests/random-org.spec.ts +3 -0
- package/tests/reverb.spec.ts +7 -0
- package/tests/tallink.spec.ts +3 -0
- package/tests/tiktok.spec.ts +2 -2
- package/tests/typo3-cookieconsent.spec.ts +10 -0
- package/tests/vinnies-org-au.spec.ts +3 -0
- package/tests/zoho.spec.ts +5 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +222 -8
- package/tests-wtr/heuristics/regex-syntax.test.ts +81 -0
- package/rules/generated/auto_GB_capcut.com_0.json +0 -28
- package/rules/generated/auto_NL_bonprix.nl_ovi.json +0 -40
- package/tests/generated/auto_GB_capcut.com_0.spec.ts +0 -2
- package/tests/generated/auto_NL_bonprix.nl_ovi.spec.ts +0 -2
|
@@ -448,6 +448,8 @@
|
|
|
448
448
|
EVAL_TEALIUM_2: () => utag.gdpr.setConsentValue(true) || true,
|
|
449
449
|
EVAL_TEALIUM_3: () => utag.gdpr.getConsentState() !== 1,
|
|
450
450
|
EVAL_TEALIUM_DONOTSELL_CHECK: () => utag.gdpr.dns?.getDnsState() !== 1,
|
|
451
|
+
// 0 means no stored decision; otherwise the user reopened the prompt themselves
|
|
452
|
+
EVAL_TEALIUM_NO_DECISION: () => utag.gdpr.getConsentState() === 0,
|
|
451
453
|
EVAL_TESTCMP_STEP: () => !!document.querySelector("#reject-all"),
|
|
452
454
|
EVAL_TESTCMP_0: () => window.results.results[0] === "button_clicked",
|
|
453
455
|
EVAL_TESTCMP_COSMETIC_0: () => window.results.results[0] === "banner_hidden",
|
|
@@ -462,7 +464,8 @@
|
|
|
462
464
|
EVAL_USERCENTRICS_API_6: () => UC_UI.areAllConsentsAccepted() === false,
|
|
463
465
|
EVAL_USERCENTRICS_BUTTON_0: () => JSON.parse(localStorage.getItem("usercentrics")).consents.every((c) => c.isEssential || !c.consentStatus),
|
|
464
466
|
EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll("label[id$=cookies-deny-label]")).forEach((e) => e.click()) || true,
|
|
465
|
-
EVAL_WBD_LTP_CLOSE: () => document.querySelector("dialog#ltp-dialog").close() || true
|
|
467
|
+
EVAL_WBD_LTP_CLOSE: () => document.querySelector("dialog#ltp-dialog").close() || true,
|
|
468
|
+
EVAL_ZOHO_TEST: () => localStorage.getItem("zglobal_Acookie_optOut") === "3"
|
|
466
469
|
};
|
|
467
470
|
function getFunctionBody(snippetFunc) {
|
|
468
471
|
const snippetStr = snippetFunc.toString();
|
|
@@ -470,18 +473,27 @@
|
|
|
470
473
|
}
|
|
471
474
|
|
|
472
475
|
// lib/heuristic-patterns.ts
|
|
476
|
+
var patternOf = (p) => p instanceof RegExp ? p : p.pattern;
|
|
477
|
+
var BY_CONTINUING_PRIVACY = /(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi;
|
|
478
|
+
var ACCEPT_ALL = /accept all/gi;
|
|
479
|
+
var USE_OF_COOKIES = /use of cookies/gi;
|
|
480
|
+
var UTILISATION_DES_COOKIES = /utilisation.{0,100}des.{0,100}cookies/gi;
|
|
481
|
+
var ACCEPTEZ_UTILISATION = /acceptez.{0,100}l.{0,100}utilisation/gi;
|
|
482
|
+
var VERWENDUNG_VON_COOKIES = /verwendung.{0,100}von.{0,100}cookies/gi;
|
|
483
|
+
var DE_COOKIE_VERB = /\b(?:nutzen|nutzt|verwenden|verwendet|setzen|setzt|benutzen|benutzt|speichert|platzieren)\b(?: \S+){0,4} cookies\b/gi;
|
|
484
|
+
var GEBRUIK_VAN_COOKIES = /gebruik.{0,100}van.{0,100}cookies/gi;
|
|
473
485
|
var DETECT_PATTERNS = [
|
|
474
486
|
/accept cookies/gi,
|
|
475
|
-
|
|
487
|
+
ACCEPT_ALL,
|
|
476
488
|
/reject all/gi,
|
|
477
489
|
/only necessary cookies/gi,
|
|
478
490
|
// "only necessary" is probably too broad
|
|
479
491
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
480
|
-
|
|
492
|
+
BY_CONTINUING_PRIVACY,
|
|
481
493
|
// up to two qualifiers are common: "optional", "essential", "analytics", "google analytics", "third party", ...
|
|
482
494
|
/we (?:use|serve)(?: \w+){0,2} cookies/gi,
|
|
483
495
|
/we are using cookies/gi,
|
|
484
|
-
|
|
496
|
+
USE_OF_COOKIES,
|
|
485
497
|
/website uses cookies to enhance your browsing experience/gi,
|
|
486
498
|
/(?:this|our) (?:web)?site.{0,100}cookies/gi,
|
|
487
499
|
/cookies (?:and|or) .{0,100} technologies/gi,
|
|
@@ -492,6 +504,33 @@
|
|
|
492
504
|
/we.{0,100}store.{0,100}information.{0,100}such as.{0,100}cookies/gi,
|
|
493
505
|
/store and\/or access information.{0,100}on a device/gi,
|
|
494
506
|
/personalised ads and content, ad and content measurement/gi,
|
|
507
|
+
// TCF wording: "store and/or access information", "and our partners ask for your consent", "we and our N partners"
|
|
508
|
+
/\b(?:store|stores|storing) and\/or access(?:ing)? information\b/gi,
|
|
509
|
+
/\band our partners ask for your consent\b/gi,
|
|
510
|
+
/\bwe and (?:our|up to) (?:\d+ )?(?:partners|vendors)\b/gi,
|
|
511
|
+
// a partner count, in each language: "our 186 partners", "unseren 107 Partnern", "nuestros 1064 socios"
|
|
512
|
+
/\b(?:our|unseren|onze|nos|nuestros|i nostri) \d{2,4} (?:partners|partnern|partner|partenaires|socios|vendors|fornitori)\b/gi,
|
|
513
|
+
/\b\d{2,4} iab[- ]partner/gi,
|
|
514
|
+
// "technologies like cookies", in each language
|
|
515
|
+
/\btechnolog(?:ies|ien|ieën|ías|ie) (?:like|such as|wie|zoals|como(?: las)?|telles que(?: les)?|come(?: i)?) cookies?\b/gi,
|
|
516
|
+
/\buses (?:\S+ ){0,2}cookies\b/gi,
|
|
517
|
+
/\b(?:like|want) to (?:use|set) (?:\S+ ){0,2}cookies\b/gi,
|
|
518
|
+
/\b(?:optional|additional|non-essential) cookies\b/gi,
|
|
519
|
+
/\bstoring of cookies\b|\bplaced cookies\b/gi,
|
|
520
|
+
/\b(?:store|stores) and access (?:data|information) on your device\b|\baccess and store (?:data|information) on your device\b/gi,
|
|
521
|
+
/\bwe use (?:\S+ ){1,4}cookies\b/gi,
|
|
522
|
+
// US privacy notices: opt-out sentences, not the footer link labels
|
|
523
|
+
/\byou (?:can|may) opt[- ]out of (?:the |this )?(?:sale|sharing|use|selling)\b/gi,
|
|
524
|
+
/\b(?:if you wish to|to) opt[- ]out of the sale\b/gi,
|
|
525
|
+
/\bthis website or its third[- ]party tools (?:process|use)\b/gi,
|
|
526
|
+
/["“]?(?:share|sell)["”]? or ["“]?(?:sell|share)["”]? (?:your )?(?:personal )?information\b/gi,
|
|
527
|
+
/\bresidents have (?:certain )?rights with regard to the sale\b/gi,
|
|
528
|
+
/\bwe use technologies (?:on this website )?(?:that may )?(?:to )?collect\b/gi,
|
|
529
|
+
// pay-or-consent walls
|
|
530
|
+
/\bcontinue reading with advertising\b|\b(?:with|mit) (?:advertising|werbung) (?:and|und) tracking\b/gi,
|
|
531
|
+
/\bconsent and continue\b/gi,
|
|
532
|
+
// preference centres are often in the page but hidden, so popup text only
|
|
533
|
+
{ pattern: /\bstore or retrieve information on your browser\b|\bstockées dans votre navigateur ou récupérées\b/gi, input: "popup" },
|
|
495
534
|
// it might be tempting to add the patterns below, but they cause too many false positives. Don't do it :)
|
|
496
535
|
// /cookies? settings/i,
|
|
497
536
|
// /cookies? preferences/i,
|
|
@@ -507,26 +546,32 @@
|
|
|
507
546
|
/consentement.{0,100}à.{0,100}tout.{0,100}moment/gi,
|
|
508
547
|
/votre.{0,100}consentement/gi,
|
|
509
548
|
/accepter.{0,100}tout/gi,
|
|
510
|
-
|
|
549
|
+
UTILISATION_DES_COOKIES,
|
|
511
550
|
/cookies.{0,100}ou.{0,100}technologies/gi,
|
|
512
|
-
|
|
551
|
+
ACCEPTEZ_UTILISATION,
|
|
513
552
|
/continuer sans accepter/gi,
|
|
514
553
|
/tout refuser/gi,
|
|
515
554
|
/(?:refuser|rejeter) tous les cookies/gi,
|
|
516
|
-
|
|
555
|
+
// not "je refuse d'…" in a headline
|
|
556
|
+
/je refuse(?! d['’e])/gi,
|
|
517
557
|
/refuser et continuer/gi,
|
|
518
558
|
/refuser les cookies/gi,
|
|
519
559
|
/seulement nécessaires/gi,
|
|
520
560
|
/je désactive les finalités non essentielles/gi,
|
|
521
561
|
/cookies essentiels uniquement/gi,
|
|
522
562
|
/nécessaires uniquement/gi,
|
|
563
|
+
/\b(?:stocker|stockons) et\/ou (?:accéder|accédons)\b/gi,
|
|
564
|
+
/\bnos partenaires demandent votre consentement\b/gi,
|
|
565
|
+
/\bconsentez à l.utilisation (?:de |des )?cookies\b|\bdépôt (?:de|des) cookies\b/gi,
|
|
566
|
+
/\bles cookies nous permettent\b|\bnos partenaires et nous(?:-mêmes)?\b/gi,
|
|
567
|
+
/\baccepter (?:&|et) fermer\b/gi,
|
|
523
568
|
// DE
|
|
524
569
|
/wir.{0,100}verwenden.{0,100}cookies/gi,
|
|
525
570
|
/wir.{0,100}und.{0,100}unsere.{0,100}partner/gi,
|
|
526
|
-
/zugriff
|
|
571
|
+
/zugriff auf informationen auf/gi,
|
|
527
572
|
/inhalte.{0,100}messung.{0,100}von.{0,100}werbeleistung.{0,100}und/gi,
|
|
528
573
|
/cookies.{0,100}und.{0,100}andere/gi,
|
|
529
|
-
|
|
574
|
+
VERWENDUNG_VON_COOKIES,
|
|
530
575
|
/wir.{0,100}nutzen.{0,100}cookies/gi,
|
|
531
576
|
/verwendet.{0,100}cookies/gi,
|
|
532
577
|
/sie.{0,100}können.{0,100}ihre.{0,100}auswahl/gi,
|
|
@@ -539,8 +584,20 @@
|
|
|
539
584
|
/nur funktionale cookies akzeptieren/gi,
|
|
540
585
|
/optionale ablehnen/gi,
|
|
541
586
|
/zustimmung verweigern/gi,
|
|
587
|
+
/\bspeichern und\/oder (?:zugreifen|abrufen)\b/gi,
|
|
588
|
+
/\bunsere partner bitten um ihre zustimmung\b/gi,
|
|
589
|
+
DE_COOKIE_VERB,
|
|
590
|
+
/\b(?:werden|wird) (?:\S+ ){0,3}cookies (?:verwendet|eingesetzt|gesetzt|genutzt)\b/gi,
|
|
591
|
+
/\bcookies? zum einsatz\b|\beinsatz von cookies\b/gi,
|
|
592
|
+
/\beinverstanden\b.{0,60}\bcookies\b|\bcookies\b.{0,80}\beinverstanden\b/gi,
|
|
593
|
+
/\b(?:alle|alles) (?:cookies |optionalen \S+ )?(?:akzeptieren|zulassen|erlauben|zustimmen)\b/gi,
|
|
594
|
+
/\bzustimmen und weiter\b|\bweiter,? ohne zu (?:akzeptieren|zustimmen)\b/gi,
|
|
595
|
+
/\b(?:einwilligung|zustimmung) (?:zu|zur|in die) (?:\S+ )?cookies\b|\bcookie-(?:zustimmung|einwilligung)\b/gi,
|
|
596
|
+
/\btracking-technologien\b/gi,
|
|
597
|
+
/\bakzeptier\w* (?:du |sie )?(?:die )?verwendung (?:\S+ )?cookies\b/gi,
|
|
598
|
+
/\bmit werbetracking weiterlesen\b|\bweiter mit werbung\b|\bcon tracking e annunci\b/gi,
|
|
542
599
|
// NL
|
|
543
|
-
|
|
600
|
+
GEBRUIK_VAN_COOKIES,
|
|
544
601
|
/(?:we|wij).{0,100}gebruiken.{0,100}cookies.{0,100}om/gi,
|
|
545
602
|
/cookies.{0,100}en.{0,100}vergelijkbare/gi,
|
|
546
603
|
/(?:alles|cookies).{0,100}(?:afwijzen|weigeren|verwerpen)/gi,
|
|
@@ -550,6 +607,13 @@
|
|
|
550
607
|
/doorgaan zonder (?:te accepteren|akkoord te gaan)/gi,
|
|
551
608
|
/alleen.{0,100}(?:optionele|functionele|functioneel|noodzakelijke|essentiële).{0,100}cookies/gi,
|
|
552
609
|
/wijs alles af/gi,
|
|
610
|
+
/\b(?:op te slaan en\/of te (?:raadplegen|openen|lezen)|opslaan en\/of (?:openen|raadplegen|lezen)|slaan informatie\b.{0,60}\bop en\/of)\b/gi,
|
|
611
|
+
/\bonze partners vragen om (?:jouw|uw|je) toestemming\b/gi,
|
|
612
|
+
/\bwij en onze (?:\d+ )?partners\b/gi,
|
|
613
|
+
/\b(?:gebruiken|gebruikt|plaatsen|plaatst)\b(?: \S+){0,3} cookies\b/gi,
|
|
614
|
+
/\baccepteer (?:alles|alle cookies)\b/gi,
|
|
615
|
+
// Dutch words only: "tracking cookies" and "marketing cookies" are also English prose and footer links
|
|
616
|
+
/\b(?:analytische|functionele|essentiële|noodzakelijke) cookies\b/gi,
|
|
553
617
|
// Spanish (ES)
|
|
554
618
|
/(si|al) contin[úu]a[sr]?( navegando)?.{0,100} cookie/gi,
|
|
555
619
|
/(usamos|utilizar?|utilizamos)( (tanto|las))?.{0,20}cookie/gi,
|
|
@@ -566,6 +630,15 @@
|
|
|
566
630
|
/nosotros y nuestros( \d+)? (socios|proveedores).{0,180} cookies/gi,
|
|
567
631
|
/recopilamos y almacenamos datos de usted y de su dispositivo/gi,
|
|
568
632
|
/utilizamos tecnolog[ií]as como las cookies/gi,
|
|
633
|
+
/\b(?:almacenar|almacenamos) y\/o (?:acceder|accedemos)\b/gi,
|
|
634
|
+
/\bnuestros socios solicitan su consentimiento\b/gi,
|
|
635
|
+
/\b(?:tanto nosotros como|nosotros y) nuestros (?:\d+ )?socios\b/gi,
|
|
636
|
+
/\b(?:aceptar|rechazar) todas\b|\bcontinuar sin aceptar\b|\bsolo las necesarias\b/gi,
|
|
637
|
+
/\bacept\w* (?:\S+ ){0,3}uso de (?:las )?cookies\b/gi,
|
|
638
|
+
/\bcookies (?:técnicas|analíticas|propias|de terceros|opcionales|necesarias)\b/gi,
|
|
639
|
+
/\blas cookies nos (?:ayudan|permiten)\b/gi,
|
|
640
|
+
/\b(?:instalamos|empleamos)\b(?: \S+){0,4} cookies\b/gi,
|
|
641
|
+
/\bacept(?:a|ar|as)? (?:el uso de |las )?(?:\S+ )?cookies\b|\bnecesitamos usar cookies\b/gi,
|
|
569
642
|
// Polish (PL)
|
|
570
643
|
// examples:
|
|
571
644
|
// wykorzystuje pliki cookie (uses cookies)
|
|
@@ -594,10 +667,11 @@
|
|
|
594
667
|
// Catalan (CA)
|
|
595
668
|
/cookies pròpies i de tercers/gi,
|
|
596
669
|
/utilitzem galetes/gi,
|
|
597
|
-
|
|
670
|
+
/únicament utilitza galetes pròpies amb finalitat tècnica\b/gi,
|
|
598
671
|
/este lloc web utilitza només cookies tècniques necessàries per al seu funcionament/gi,
|
|
599
672
|
/utilitza cookies tècniques,\s*de personalització i anàlisi/gi,
|
|
600
673
|
/utilitzem cookies i altres tecnologies/gi,
|
|
674
|
+
/\b(?:utilitz\w*|fa servir|fem servir|usem)\b(?: \S+){0,3} (?:cookies|galetes)\b/gi,
|
|
601
675
|
// Basque (EU)
|
|
602
676
|
/cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu/gi,
|
|
603
677
|
/cookie propioak eta hirugarrenen cookieak erabiltzen ditugu/gi,
|
|
@@ -627,7 +701,18 @@
|
|
|
627
701
|
/(?:usiamo|utilizziamo).{0,20}cookie/gi,
|
|
628
702
|
/sito.{0,50}(?:usa|utilizza).{0,20}cookie/gi,
|
|
629
703
|
/noi e i nostri.{0,20}partner.{0,100}cookie/gi,
|
|
630
|
-
|
|
704
|
+
/\b(?:utilizziamo|usiamo|impieghiamo|installiamo)\b(?: \S+){0,3} cookies?\b/gi,
|
|
705
|
+
/\b(?:utilizza|utilizzano|usa|usano|impiega|installa|fa uso di)\b(?: \S+){0,3} cookies?\b/gi,
|
|
706
|
+
/\bcookies? (?:tecnici|di profilazione|di terze parti|analitici|statistici|di marketing)\b/gi,
|
|
707
|
+
/\b(?:acconsent|accett)\w*\b.{0,40}\b(?:uso|utilizzo|installazione)\b.{0,15}\bcookies?\b/gi,
|
|
708
|
+
/\b(?:continuando|proseguendo)(?: la| nella)? navigazione\b.{0,80}\b(?:accett|acconsent)\w*/gi,
|
|
709
|
+
/\b(?:accetta|accetto|accettare|rifiuta|rifiuto|rifiutare)(?: tutti| tutto)\b/gi,
|
|
710
|
+
/\b(?:continua|prosegui|chiudi) senza accettare\b/gi,
|
|
711
|
+
/\brifiuta e abbonati\b/gi,
|
|
712
|
+
/\bconsenso (?:all.(?:uso|utilizzo) (?:dei |di )?)?cookies?\b/gi,
|
|
713
|
+
/\b(?:insieme ai|con i) nostri (?:\d+ )?partner\b/gi,
|
|
714
|
+
/\bterze parti selezionate\b/gi,
|
|
715
|
+
/\b(?:archiviare|archiviamo|memorizzare|memorizziamo) e\/o (?:accedere|accediamo)\b/gi,
|
|
631
716
|
// Swedish (SV)
|
|
632
717
|
// e.g. "vi använder cookies", "vi använder spårningstekniker såsom cookies", "webbplatsen använder kakor"
|
|
633
718
|
/(?:vi|webbplatsen|webbplats|sajten|sidan)\s+använder.{0,60}(?:cookies|kakor)/gi,
|
|
@@ -882,26 +967,12 @@
|
|
|
882
967
|
// Russian (RU): paywall/subscription wording, e.g. "отказаться от подписки", "оплатить"
|
|
883
968
|
/подписатьс|подписк|оплатит|оплачива/is
|
|
884
969
|
];
|
|
885
|
-
var DETECT_NEVER_MATCH_PATTERNS = [
|
|
886
|
-
// e.g. "age verification", "age confirmation", "age check", "age gate", "age restriction"
|
|
887
|
-
/age\s+(?:verification|confirmation|check|gate|restriction)/i,
|
|
888
|
-
// e.g. "over 18 years", "at least 21 years", "older than 21", "18+"
|
|
889
|
-
/(?:over|above|at\s*least|minimum|older\s+than)\s*(?:18|21)\s*(?:years|yo|y\.?o\.?|\+)?/i,
|
|
890
|
-
// e.g. "18 years of age", "18+ years old", "21 years or older"
|
|
891
|
-
/(?:18|21)\s*(?:\+|years?)\s*(?:of\s*age|or\s*older|or\s*above)/i,
|
|
892
|
-
// e.g. "I am 18+", "I am over 18", "I'm 21 or older"
|
|
893
|
-
/(?:i'?m|i\s*am)\s*(?:over|above|at\s*least)?\s*(?:18|21)(?:\+|\s*(?:or\s*older|years))?/i,
|
|
894
|
-
// e.g. "you must be 18", "users must be at least 21", "visitors must be over 18"
|
|
895
|
-
/(?:you|users?|visitors?)\s+must\s+be\s+(?:over|above|at\s*least)?\s*(?:18|21)/i,
|
|
896
|
-
// e.g. "adult oriented material", "adult content", "adult-only website"
|
|
897
|
-
/adult[\s-]+(?:oriented|only|content|material|websites?)/i
|
|
898
|
-
];
|
|
899
970
|
var SETTINGS_PATTERNS = [
|
|
900
971
|
// Multilingual "open customization" patterns: a customization verb next to a
|
|
901
972
|
// cookie/preference/settings/options/details/purposes noun (both word orders).
|
|
902
973
|
// The negative lookahead avoids policy links and save/confirm/accept phrases (those are accept/acknowledge/other).
|
|
903
|
-
/^(?!.*\b(policy|policies|notice|statement|impressum|\w*richtlinie\w*|\w*erklärung|page|beschrijving|privacy$|beleid|politique|política|polityk|speichern|guardar|opslaan|zapisz|enregistrer|sauvegarder|bevestig|bestätig|confirm|save|submit|akzeptier|accept|zaakcept)\b)(customi[sz]e|manage|adjust|configure|personali[sz]e|let me choose|edit|change|set|select|view|see|review|update|open|show|choose|anpassen|verwalten|konfigurieren|bearbeiten|öffnen|anzeigen|einblenden|einstellen|festlegen|auswählen|wählen|aanpassen|beheren|instellen|wijzig\w*|personaliseren|personaliseer|kies|bekijk|toon|personnaliser|paramétrer|gérer|configurer|choisir|afficher|définir|modifier|configurar|personalizar|gestionar|administrar|ajustar|seleccionar|modificar|establecer|dostosuj|zarządzaj|personalizuj|ustaw\w*|zmień|pokaż|wybierz)
|
|
904
|
-
/^(?!.*\b(policy|policies|notice|statement|impressum|\w*richtlinie\w*|\w*erklärung|page|beschrijving|privacy$|beleid|politique|política|polityk|speichern|guardar|opslaan|zapisz|enregistrer|sauvegarder|bevestig|bestätig|confirm|save|submit|akzeptier|accept|zaakcept)\b)(cookies?|preferences?|settings?|options?|choices?|controls?|details?|purposes?|services?|consent|einstellung\w*|optionen|präferenzen|einzelheiten|zwecke|dienste|datenschutz\w*|auswahl|voorkeur\w*|instelling\w*|opties|diensten|préférences|paramètres|réglages|choix|détails|finalités|témoins|preferencia\w*|opciones|ajustes|configuraci\w*|detalles|servicios|elección|preferencj\w*|ustawie\w*|opcje|szczegół\w*|cele|galetes)\b(.{0,14}\W)?(customi[sz]e|manage|adjust|configure|personali[sz]e|let me choose|edit|change|set|select|view|see|review|update|open|show|choose|anpassen|verwalten|konfigurieren|bearbeiten|öffnen|anzeigen|einblenden|einstellen|festlegen|auswählen|wählen|aanpassen|beheren|instellen|wijzig\w*|personaliseren|personaliseer|kies|bekijk|toon|personnaliser|paramétrer|gérer|configurer|choisir|afficher|définir|modifier|configurar|personalizar|gestionar|administrar|ajustar|seleccionar|modificar|establecer|dostosuj|zarządzaj|personalizuj|ustaw\w*|zmień|pokaż|wybierz)
|
|
974
|
+
/^(?!.*\b(policy|policies|notice|statement|impressum|\w*richtlinie\w*|\w*erklärung|page|beschrijving|privacy$|beleid|politique|política|polityk|speichern|guardar|opslaan|zapisz|enregistrer|sauvegarder|bevestig|bestätig|confirm|save|submit|akzeptier|accept|zaakcept)\b)(customi[sz]e|manage|adjust|configure|personali[sz]e|let me choose|edit|change|set|select|view|see|review|update|open|show|choose|anpassen|verwalten|konfigurieren|bearbeiten|öffnen|anzeigen|einblenden|einstellen|festlegen|auswählen|wählen|aanpassen|beheren|instellen|wijzig\w*|personaliseren|personaliseer|kies|bekijk|toon|personnaliser|paramétrer|gérer|configurer|choisir|afficher|définir|modifier|configurar|personalizar|gestionar|administrar|ajustar|seleccionar|modificar|establecer|dostosuj|zarządzaj|personalizuj|ustaw\w*|zmień|pokaż|wybierz)(?!\w).{0,20}(cookies?|preferences?|settings?|options?|choices?|controls?|details?|purposes?|services?|consent|einstellung\w*|optionen|präferenzen|einzelheiten|zwecke|dienste|datenschutz\w*|auswahl|voorkeur\w*|instelling\w*|opties|diensten|préférences|paramètres|réglages|choix|détails|finalités|témoins|preferencia\w*|opciones|ajustes|configuraci\w*|detalles|servicios|elección|preferencj\w*|ustawie\w*|opcje|szczegół\w*|cele|galetes)\b/is,
|
|
975
|
+
/^(?!.*\b(policy|policies|notice|statement|impressum|\w*richtlinie\w*|\w*erklärung|page|beschrijving|privacy$|beleid|politique|política|polityk|speichern|guardar|opslaan|zapisz|enregistrer|sauvegarder|bevestig|bestätig|confirm|save|submit|akzeptier|accept|zaakcept)\b)(cookies?|preferences?|settings?|options?|choices?|controls?|details?|purposes?|services?|consent|einstellung\w*|optionen|präferenzen|einzelheiten|zwecke|dienste|datenschutz\w*|auswahl|voorkeur\w*|instelling\w*|opties|diensten|préférences|paramètres|réglages|choix|détails|finalités|témoins|preferencia\w*|opciones|ajustes|configuraci\w*|detalles|servicios|elección|preferencj\w*|ustawie\w*|opcje|szczegół\w*|cele|galetes)\b(.{0,14}\W)?(customi[sz]e|manage|adjust|configure|personali[sz]e|let me choose|edit|change|set|select|view|see|review|update|open|show|choose|anpassen|verwalten|konfigurieren|bearbeiten|öffnen|anzeigen|einblenden|einstellen|festlegen|auswählen|wählen|aanpassen|beheren|instellen|wijzig\w*|personaliseren|personaliseer|kies|bekijk|toon|personnaliser|paramétrer|gérer|configurer|choisir|afficher|définir|modifier|configurar|personalizar|gestionar|administrar|ajustar|seleccionar|modificar|establecer|dostosuj|zarządzaj|personalizuj|ustaw\w*|zmień|pokaż|wybierz)(?!\w)/is,
|
|
905
976
|
// settings noun + cookies, e.g. "paramètres des cookies", "ajustes de cookies", "instellingen voor cookies en diensten"
|
|
906
977
|
/^(paramètres|préférences|réglages|ajustes|opciones|elección|preferencias|instellingen)( (de|des|les|voor|van))? cookies( (et des|en|y) (services|diensten|servicios))?$/is,
|
|
907
978
|
"settings",
|
|
@@ -1257,41 +1328,518 @@
|
|
|
1257
1328
|
"\u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C"
|
|
1258
1329
|
];
|
|
1259
1330
|
|
|
1260
|
-
// lib/heuristic-
|
|
1331
|
+
// lib/heuristic-negatives.ts
|
|
1332
|
+
var COOKIE_CHOICE = [
|
|
1333
|
+
"\\b(?:accept|reject|decline|refuse|deny|allow|manage|customi[sz]e)\\b[^\\n]{0,25}\\bcookies?\\b",
|
|
1334
|
+
"\\b(?:reject|decline|deny|refuse) all\\b",
|
|
1335
|
+
"\\b(?:essential|necessary|required) (?:cookies )?only\\b|\\bonly (?:essential|necessary|required)\\b",
|
|
1336
|
+
"\\bcookies? (?:notice|settings|preferences|banner)\\b",
|
|
1337
|
+
"\\b(?:alle )?(?:cookies )?ablehnen\\b",
|
|
1338
|
+
"\\b(?:alles |alle cookies )?(?:weigeren|weiger|afwijzen)\\b",
|
|
1339
|
+
"\\b(?:tout )?refuser\\b",
|
|
1340
|
+
"\\brechazar(?: todas?)?\\b",
|
|
1341
|
+
"\\brifiuta(?: tutti)?\\b",
|
|
1342
|
+
// purposes and vendors as a button or heading line: some consent dialogs ask "under 18?"
|
|
1343
|
+
"^[^\\n]{0,40}\\b(?:purposes|finalit\xE9s|prop\xF3sitos|zwecke|doeleinden|finalit\xE0|vendors|fournisseurs|proveedores|leveranciers|fornitori)(?!\\w)[^\\n]{0,10}$",
|
|
1344
|
+
"\\b(?:legitimate (?:business )?interest|int\xE9r\xEAt l\xE9gitime|inter\xE9s leg\xEDtimo|berechtigtes interesse|gerechtvaardigd belang|legittimo interesse)\\b",
|
|
1345
|
+
"\\b(?:we|nous|wir|wij|noi|nosotros) (?:and|et|und|en|e|y) (?:our|nos|unsere|onze|i nostri|nuestros) (?:\\d+ )?(?:partners|partenaires|partner|socios)\\b"
|
|
1346
|
+
].join("|");
|
|
1347
|
+
var BARE_ACCEPT = [
|
|
1348
|
+
"\\b(?:accept|allow) all\\b",
|
|
1349
|
+
"\\b(?:alle )?(?:cookies )?(?:akzeptieren|erlauben|zulassen)\\b",
|
|
1350
|
+
"\\b(?:alles |alle cookies )?(?:accepteren|accepteer|toestaan)\\b",
|
|
1351
|
+
"\\b(?:tout )?accepter\\b",
|
|
1352
|
+
"\\baceptar(?: todas?)?\\b",
|
|
1353
|
+
"\\baccetta(?: tutti)?\\b"
|
|
1354
|
+
].join("|");
|
|
1355
|
+
var COOKIE_CHOICE_RE = new RegExp(COOKIE_CHOICE, "im");
|
|
1356
|
+
var CONSENT_CHOICE = new RegExp(`${COOKIE_CHOICE}|${BARE_ACCEPT}`, "im");
|
|
1357
|
+
var AGE_WORDING = new RegExp(
|
|
1358
|
+
[
|
|
1359
|
+
"\\b(?:over|above|at least|older than|minimum(?: age of)?)\\s*(?:18|21|eighteen)\\b",
|
|
1360
|
+
// "18+" only with age words after it: a bare "18+" also appears in cookie banners on adult sites
|
|
1361
|
+
"\\b(?:18|21)\\+?\\s*(?:years?(?: of age| old)?|yo|or older|or over)\\b",
|
|
1362
|
+
"\\b(?:you|users?|visitors?) must be (?:over |above |at least )?(?:18|21)\\b",
|
|
1363
|
+
"\\b(?:i'?m|i am) (?:over |at least )?(?:18|21)\\b",
|
|
1364
|
+
"\\bage (?:verification|confirmation|check|gate|restriction)\\b",
|
|
1365
|
+
"\\b(?:adults? only|adult[\\s-](?:oriented|content|material|website)|legal age|age of majority|not a minor|minors)\\b",
|
|
1366
|
+
"\\b(?:18|21) jahre\\b",
|
|
1367
|
+
"\\balters(?:beschr\xE4nkung|best\xE4tigung|verifikation|pr\xFCfung|kontrolle)",
|
|
1368
|
+
"\\b(?:vollj\xE4hrig|f\xFCr erwachsene|minderj\xE4hrige)\\b",
|
|
1369
|
+
"\\b(?:18|21) jaar\\b",
|
|
1370
|
+
"\\b(?:volwassenen|meerderjarig|minderjarigen|leeftijdsverificatie)\\b",
|
|
1371
|
+
"\\b(?:18|21) ans\\b",
|
|
1372
|
+
// no \\b before an accented letter: without the u flag it is not a word character
|
|
1373
|
+
"\\b(?:pour adultes|v\xE9rification de l.\xE2ge|mineurs)\\b|\xE2ge l\xE9gal\\b",
|
|
1374
|
+
"\\b(?:18|21) a\xF1os\\b",
|
|
1375
|
+
"\\b(?:mayor(?:es)? de edad|menores de edad|para adultos|verificaci\xF3n de edad)\\b",
|
|
1376
|
+
"\\b(?:18|21) anni\\b",
|
|
1377
|
+
"\\b(?:maggiorenne|minorenni|per adulti)\\b|\\bverifica dell.et\xE0(?!\\w)"
|
|
1378
|
+
].join("|"),
|
|
1379
|
+
"i"
|
|
1380
|
+
);
|
|
1381
|
+
var DISMISS_LINE = /^\s*(?:(?:yes,? )?(?:i )?(?:ok(?:ay)?|accept|agree|allow|decline|deny|reject|refuse|understand|acknowledge(?: the use of cookies)?|got it|understood)(?: all)?(?:,? (?:and|&) (?:continue|close))?(?: non-essential)?|close|dismiss|akzeptieren|zustimmen|verstanden|einverstanden|ablehnen|accepteren|akkoord|weigeren|accepter|j.accepte|d.accord|refuser|fermer|aceptar|acepto|rechazar|entendido|accetto|accetta|rifiuta|ho capito|chiudi)\s*[!.]?\s*$/im;
|
|
1382
|
+
var DISMISS_END = /[.!?]\s+(?:ok(?:ay)?|got it|i agree|accept)\s*!?\s*$|\[\s*[x×]\s*\]|^\s*[x×✕]\s*$/im;
|
|
1383
|
+
var NOTICE_CONTROL = new RegExp(`${CONSENT_CHOICE.source}|${DISMISS_LINE.source}|${DISMISS_END.source}`, "im");
|
|
1384
|
+
var LEAVE_LINE = /^\s*(?:(?:no,? )?(?:i )?(?:want to )?(?:leave|exit|verlassen|quitter|sortir|salir|abandonar|esci|uscire|verlaten)\b[^\n]{0,30}|no,? take me away|(?:seite|hier) verlassen|(?:i am|i'm|ich bin|ik ben|je suis|soy|sono) (?:under|unter|onder|jonger dan|menor de(?: edad)?|minorenne|mineur)\b[^\n]{0,10})\s*[!.]?\s*$/im;
|
|
1385
|
+
var NOTICE_OWN_CONTROL = new RegExp(
|
|
1386
|
+
[
|
|
1387
|
+
"\\bcookies? verwalten\\b|\\bcookie-?(?:einstellungen|pr\xE4ferenzen)\\b|\\beinstellungen verwalten\\b",
|
|
1388
|
+
"\\bconfigura(?:r|ci\xF3n de)(?: las)? cookies\\b|\\bgestionar(?: las)? cookies\\b|\\bpersonalizar(?: las)? cookies\\b",
|
|
1389
|
+
"\\bparam[\xE9e]trer(?: les)? cookies\\b|\\bparam[\xE8e]tres(?: des)? cookies\\b|\\bg[\xE9e]rer(?: les)? cookies\\b|\\bpersonnaliser(?: les)? cookies\\b",
|
|
1390
|
+
"\\bgestisci(?: i)? cookie|\\bimpostazioni(?: dei| sui)? cookie|\\bpersonalizza(?: i)? cookie",
|
|
1391
|
+
"\\bcookie-?instellingen\\b|\\bcookies? beheren\\b|\\bvoorkeuren (?:beheren|aanpassen)\\b",
|
|
1392
|
+
"^\\s*(?:customi[sz]e|personnaliser|param\xE9trer|personalizar|configurar|personalizza|anpassen|aanpassen|meer opties|more options|weitere optionen|plus d.options|m\xE1s opciones|altre opzioni|manage (?:options|preferences|choices))\\s*$",
|
|
1393
|
+
"^\\s*close (?:this|the) (?:popup|banner|notice|message)\\s*$"
|
|
1394
|
+
].join("|"),
|
|
1395
|
+
"im"
|
|
1396
|
+
);
|
|
1397
|
+
var ageGateUnless = (control) => (text) => !LEAVE_LINE.test(text) && (control.test(text) || NOTICE_OWN_CONTROL.test(text));
|
|
1398
|
+
var CONSENT_WORDS = /cookie|consent|track|partner|personali[sz]|advertis|analytic|privacy (?:options|choices|settings|rights)|do not sell|opt[- ]out/i;
|
|
1399
|
+
var LEGAL_AGREEMENT = /\b(?:end[- ]user licen[cs]e agreement|licen[cs]e agreement|limitation of liability|governing law|indemnif\w*|hereunder|disclaimers? of warrant\w*|warrant(?:y|ies) of merchantability)\b/i;
|
|
1400
|
+
var DETECT_CONTEXT_NEGATIVES = [
|
|
1401
|
+
// popups with their own age confirmation are age gates, even when they mention cookies; a bare accept doesn't count
|
|
1402
|
+
// as a cookie choice here, since it may confirm the age
|
|
1403
|
+
{ name: "age-gate-popup", pattern: AGE_WORDING, unless: ageGateUnless(COOKIE_CHOICE_RE), whole: true, input: "popup" },
|
|
1404
|
+
// a license or terms agreement may mention cookies, and its decline button must not be clicked as a cookie reject
|
|
1405
|
+
{ name: "legal-agreement", pattern: LEGAL_AGREEMENT, whole: true, input: "popup" },
|
|
1406
|
+
// page text next to an age gate, unless a consent control is there too
|
|
1407
|
+
{ name: "age-gate", pattern: AGE_WORDING, unless: ageGateUnless(NOTICE_CONTROL), lines: [4, 5], input: "page" },
|
|
1408
|
+
// terms of use need cookie or consent wording; a privacy-policy-only notice needs that or a button
|
|
1409
|
+
{
|
|
1410
|
+
name: "terms-without-consent",
|
|
1411
|
+
pattern: /\bterms\b|\bconditions\b/i,
|
|
1412
|
+
unless: CONSENT_WORDS,
|
|
1413
|
+
appliesTo: [BY_CONTINUING_PRIVACY]
|
|
1414
|
+
},
|
|
1415
|
+
{
|
|
1416
|
+
name: "privacy-without-control",
|
|
1417
|
+
unless: new RegExp(`${CONSENT_WORDS.source}|${DISMISS_LINE.source}`, "im"),
|
|
1418
|
+
appliesTo: [BY_CONTINUING_PRIVACY]
|
|
1419
|
+
},
|
|
1420
|
+
// a cookie policy link among short footer link lines
|
|
1421
|
+
{
|
|
1422
|
+
name: "footer-link",
|
|
1423
|
+
pattern: /^[^.!?:\n]{0,60}\n[\s]*\n?[^.!?:\s][^.!?:\n]{0,59}(?:\n|$)/,
|
|
1424
|
+
unless: NOTICE_CONTROL,
|
|
1425
|
+
lines: [0, 2],
|
|
1426
|
+
input: "page",
|
|
1427
|
+
appliesTo: [USE_OF_COOKIES, VERWENDUNG_VON_COOKIES, UTILISATION_DES_COOKIES, GEBRUIK_VAN_COOKIES]
|
|
1428
|
+
},
|
|
1429
|
+
// "accept all" in prose; case-sensitive since button labels run together in innerText
|
|
1430
|
+
{
|
|
1431
|
+
name: "accept-all-prose",
|
|
1432
|
+
pattern: /\baccept all [a-z]|\baccept All[a-z]/,
|
|
1433
|
+
unless: /accept all (?:cookies|and|&)/i,
|
|
1434
|
+
window: 15,
|
|
1435
|
+
appliesTo: [ACCEPT_ALL]
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
name: "acceptez-terms",
|
|
1439
|
+
pattern: /conditions (?:générales )?d.utilisation|\bcgu\b/i,
|
|
1440
|
+
unless: /cookie|témoin|traceur|partenaire/i,
|
|
1441
|
+
appliesTo: [ACCEPTEZ_UTILISATION]
|
|
1442
|
+
},
|
|
1443
|
+
// the same sentence is also a footer line with only a "learn more" link
|
|
1444
|
+
{ name: "de-cookie-verb-needs-control", unless: NOTICE_CONTROL, lines: [1, 6], input: "page", appliesTo: [DE_COOKIE_VERB] }
|
|
1445
|
+
];
|
|
1446
|
+
|
|
1447
|
+
// lib/heuristic-literals.ts
|
|
1448
|
+
var DETECT_PATTERN_LITERALS = [
|
|
1449
|
+
["accept cookies"],
|
|
1450
|
+
["accept all"],
|
|
1451
|
+
["reject all"],
|
|
1452
|
+
["only necessary cookies"],
|
|
1453
|
+
[],
|
|
1454
|
+
[],
|
|
1455
|
+
[" cookies"],
|
|
1456
|
+
["we are using cookies"],
|
|
1457
|
+
["use of cookies"],
|
|
1458
|
+
["website uses cookies to enhance your browsing experience"],
|
|
1459
|
+
["cookies"],
|
|
1460
|
+
[" technologies"],
|
|
1461
|
+
["such as cookies"],
|
|
1462
|
+
["read more about"],
|
|
1463
|
+
["consent to"],
|
|
1464
|
+
["we and our partners"],
|
|
1465
|
+
["information"],
|
|
1466
|
+
["store and/or access information"],
|
|
1467
|
+
["personalised ads and content, ad and content measurement"],
|
|
1468
|
+
[" and/or access"],
|
|
1469
|
+
["and our partners ask for your consent"],
|
|
1470
|
+
["we and "],
|
|
1471
|
+
["partners", "partnern", "partner", "partenaires", "socios", "vendors", "fornitori"],
|
|
1472
|
+
["partner"],
|
|
1473
|
+
["technolog"],
|
|
1474
|
+
["cookies"],
|
|
1475
|
+
["cookies"],
|
|
1476
|
+
["optional", "additional", "non-essential"],
|
|
1477
|
+
["storing of cookies", "placed cookies"],
|
|
1478
|
+
[" on your device", "access and store "],
|
|
1479
|
+
["we use "],
|
|
1480
|
+
["out of "],
|
|
1481
|
+
["out of the sale"],
|
|
1482
|
+
["this website or its third"],
|
|
1483
|
+
["information"],
|
|
1484
|
+
["rights with regard to the sale"],
|
|
1485
|
+
["we use technologies "],
|
|
1486
|
+
["continue reading with advertising", " tracking"],
|
|
1487
|
+
["consent and continue"],
|
|
1488
|
+
["store or retrieve information on your browser", "stock\xE9es dans votre navigateur ou r\xE9cup\xE9r\xE9es"],
|
|
1489
|
+
["utilisons"],
|
|
1490
|
+
["cookies"],
|
|
1491
|
+
["consentement"],
|
|
1492
|
+
["partenaires"],
|
|
1493
|
+
["publicit\xE9s"],
|
|
1494
|
+
["utilise"],
|
|
1495
|
+
["utilisent"],
|
|
1496
|
+
["stocker"],
|
|
1497
|
+
["consentement"],
|
|
1498
|
+
["consentement"],
|
|
1499
|
+
["accepter"],
|
|
1500
|
+
["utilisation"],
|
|
1501
|
+
["technologies"],
|
|
1502
|
+
["utilisation"],
|
|
1503
|
+
["continuer sans accepter"],
|
|
1504
|
+
["tout refuser"],
|
|
1505
|
+
[" tous les cookies"],
|
|
1506
|
+
["je refuse"],
|
|
1507
|
+
["refuser et continuer"],
|
|
1508
|
+
["refuser les cookies"],
|
|
1509
|
+
["seulement n\xE9cessaires"],
|
|
1510
|
+
["je d\xE9sactive les finalit\xE9s non essentielles"],
|
|
1511
|
+
["cookies essentiels uniquement"],
|
|
1512
|
+
["n\xE9cessaires uniquement"],
|
|
1513
|
+
["stocker", "stockons"],
|
|
1514
|
+
["nos partenaires demandent votre consentement"],
|
|
1515
|
+
["consentez \xE0 l", " cookies"],
|
|
1516
|
+
["les cookies nous permettent", "nos partenaires et nous"],
|
|
1517
|
+
["accepter "],
|
|
1518
|
+
["verwenden"],
|
|
1519
|
+
["partner"],
|
|
1520
|
+
["zugriff auf informationen auf"],
|
|
1521
|
+
["werbeleistung"],
|
|
1522
|
+
["cookies"],
|
|
1523
|
+
["verwendung"],
|
|
1524
|
+
["cookies"],
|
|
1525
|
+
["verwendet"],
|
|
1526
|
+
["auswahl"],
|
|
1527
|
+
["technologien"],
|
|
1528
|
+
["verwenden"],
|
|
1529
|
+
["ablehnen"],
|
|
1530
|
+
["zus\xE4tzliche", "essenzielle", "funktionale", "notwendige", "erforderliche"],
|
|
1531
|
+
["einwilligung", "zustimmung", "cookies"],
|
|
1532
|
+
["ablehnen"],
|
|
1533
|
+
["nur funktionale cookies akzeptieren"],
|
|
1534
|
+
["optionale ablehnen"],
|
|
1535
|
+
["zustimmung verweigern"],
|
|
1536
|
+
["speichern und/oder "],
|
|
1537
|
+
["unsere partner bitten um ihre zustimmung"],
|
|
1538
|
+
[" cookies"],
|
|
1539
|
+
["cookies "],
|
|
1540
|
+
[" zum einsatz", "einsatz von cookies"],
|
|
1541
|
+
["einverstanden", "einverstanden"],
|
|
1542
|
+
["akzeptieren", "zulassen", "erlauben", "zustimmen"],
|
|
1543
|
+
["zustimmen und weiter", " ohne zu "],
|
|
1544
|
+
["einwilligung", "zustimmung", "zustimmung", "einwilligung"],
|
|
1545
|
+
["tracking-technologien"],
|
|
1546
|
+
["verwendung "],
|
|
1547
|
+
["mit werbetracking weiterlesen", "weiter mit werbung", "con tracking e annunci"],
|
|
1548
|
+
["gebruik"],
|
|
1549
|
+
["gebruiken"],
|
|
1550
|
+
["vergelijkbare"],
|
|
1551
|
+
["afwijzen", "weigeren", "verwerpen"],
|
|
1552
|
+
["noodzakelijk"],
|
|
1553
|
+
["cookies weigeren"],
|
|
1554
|
+
["weiger"],
|
|
1555
|
+
["doorgaan zonder "],
|
|
1556
|
+
["optionele", "functionele", "functioneel", "noodzakelijke", "essenti\xEBle"],
|
|
1557
|
+
["wijs alles af"],
|
|
1558
|
+
[],
|
|
1559
|
+
["onze partners vragen om "],
|
|
1560
|
+
["wij en onze "],
|
|
1561
|
+
[" cookies"],
|
|
1562
|
+
["accepteer "],
|
|
1563
|
+
["analytische", "functionele", "essenti\xEBle", "noodzakelijke"],
|
|
1564
|
+
[" contin"],
|
|
1565
|
+
["cookie"],
|
|
1566
|
+
[" uso de cookies"],
|
|
1567
|
+
["usa cookies de google"],
|
|
1568
|
+
[" uso de cookies"],
|
|
1569
|
+
["al utilizar nuestro sitio web"],
|
|
1570
|
+
["almacenar la informaci\xF3n en un dispositivo y"],
|
|
1571
|
+
[" utiliza"],
|
|
1572
|
+
["cookies propias y de"],
|
|
1573
|
+
["son necesarias"],
|
|
1574
|
+
[" cookie"],
|
|
1575
|
+
["navegando"],
|
|
1576
|
+
["nosotros y nuestros"],
|
|
1577
|
+
["recopilamos y almacenamos datos de usted y de su dispositivo"],
|
|
1578
|
+
["utilizamos tecnolog"],
|
|
1579
|
+
["almacenar", "almacenamos"],
|
|
1580
|
+
["nuestros socios solicitan su consentimiento"],
|
|
1581
|
+
["tanto nosotros como", "nosotros y"],
|
|
1582
|
+
["aceptar", "rechazar", "continuar sin aceptar", "solo las necesarias"],
|
|
1583
|
+
["uso de "],
|
|
1584
|
+
["cookies "],
|
|
1585
|
+
["las cookies nos "],
|
|
1586
|
+
["instalamos", "empleamos"],
|
|
1587
|
+
["cookies", "necesitamos usar cookies"],
|
|
1588
|
+
[" cookie"],
|
|
1589
|
+
["u\u017Cywa\u0107", "u\u017Cywamy"],
|
|
1590
|
+
["cele przetwarzania twoich danych przez zaufanych partner\xF3w iab"],
|
|
1591
|
+
["dzi\u0119ki "],
|
|
1592
|
+
[" plik\xF3w cookie"],
|
|
1593
|
+
["korzystamy z technologii, takich jak pliki cookie"],
|
|
1594
|
+
["korzystamy"],
|
|
1595
|
+
["niekt\xF3re pliki cookies"],
|
|
1596
|
+
["pliki cookies i pokrewne im technologie umo\u017Cliwiaj\u0105 poprawne dzia\u0142anie strony i pomagaj\u0105 nam dostosowa\u0107 ofert\u0119 do twoich potrzeb"],
|
|
1597
|
+
["przechowywanie informacji na urz\u0105dzeniu lub dost\u0119p do nich"],
|
|
1598
|
+
["przechowywanie plik\xF3w cookie na swoim urz\u0105dzeniu"],
|
|
1599
|
+
["przechowywa\u0107 i uzyskiwa\u0107 dost\u0119p do informacji na twoich urz\u0105dzeniach"],
|
|
1600
|
+
["przetwarzamy"],
|
|
1601
|
+
[" u\u017Cywa "],
|
|
1602
|
+
["ta strona korzysta z ciasteczek"],
|
|
1603
|
+
["uzyskujemy dost\u0119p i przechowujemy informacje na urz\u0105dzeniu"],
|
|
1604
|
+
["u\u017Cywa plik"],
|
|
1605
|
+
["u\u017Cywamy plik\xF3w"],
|
|
1606
|
+
["wykorzystuj\u0105 "],
|
|
1607
|
+
["za pomoc\u0105 plik\xF3w cookies"],
|
|
1608
|
+
["zgod\u0105 my i nasi partnerzy mo\u017Cemy wykorzystywa\u0107 precyzyjne dane geolokalizacyjne i identyfikacj\u0119"],
|
|
1609
|
+
["cookies pr\xF2pies i de tercers"],
|
|
1610
|
+
["utilitzem galetes"],
|
|
1611
|
+
["\xFAnicament utilitza galetes pr\xF2pies amb finalitat t\xE8cnica"],
|
|
1612
|
+
["este lloc web utilitza nom\xE9s cookies t\xE8cniques necess\xE0ries per al seu funcionament"],
|
|
1613
|
+
["de personalitzaci\xF3 i an\xE0lisi"],
|
|
1614
|
+
["utilitzem cookies i altres tecnologies"],
|
|
1615
|
+
["cookies", "galetes"],
|
|
1616
|
+
["cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu"],
|
|
1617
|
+
["cookie propioak eta hirugarrenen cookieak erabiltzen ditugu"],
|
|
1618
|
+
["cookie propioak eta hirugarrenenak helburu teknikoarekin erabiltzen ditu"],
|
|
1619
|
+
["ak erabiltzen ditu"],
|
|
1620
|
+
["cookieak erabiltzen ditu"],
|
|
1621
|
+
[" bazkideek cookieak eta identifikadoreak erabiltzen ditugu"],
|
|
1622
|
+
["norberaren eta hirugarrenen cookie"],
|
|
1623
|
+
["web orri honek cookieak erabiltzen ditu"],
|
|
1624
|
+
["webgune honek cookie propioak eta hirugarrenen cookie-fitxategiak erabiltzen ditu"],
|
|
1625
|
+
["empregamos cookies propias"],
|
|
1626
|
+
["este portal emprega cookies propias ou de terceiros con fins anal\xEDticos"],
|
|
1627
|
+
["\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443"],
|
|
1628
|
+
["\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443"],
|
|
1629
|
+
["cookie", "\u043A\u0443\u043A\u0438"],
|
|
1630
|
+
["\u0442\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0438"],
|
|
1631
|
+
["cookie", "\u043A\u0443\u043A\u0438"],
|
|
1632
|
+
[],
|
|
1633
|
+
["usiamo", "utilizziamo"],
|
|
1634
|
+
["cookie"],
|
|
1635
|
+
["noi e i nostri"],
|
|
1636
|
+
[" cookie"],
|
|
1637
|
+
[" cookie"],
|
|
1638
|
+
["tecnici", "di profilazione", "di terze parti", "analitici", "statistici", "di marketing"],
|
|
1639
|
+
["acconsent", "accett"],
|
|
1640
|
+
[" navigazione"],
|
|
1641
|
+
["accetta", "accetto", "accettare", "rifiuta", "rifiuto", "rifiutare"],
|
|
1642
|
+
[" senza accettare"],
|
|
1643
|
+
["rifiuta e abbonati"],
|
|
1644
|
+
["consenso "],
|
|
1645
|
+
[" nostri "],
|
|
1646
|
+
["terze parti selezionate"],
|
|
1647
|
+
["archiviare", "archiviamo", "memorizzare", "memorizziamo"],
|
|
1648
|
+
["anv\xE4nder"],
|
|
1649
|
+
["cookie", "\u30AF\u30C3\u30AD\u30FC"],
|
|
1650
|
+
["bruger cookies"],
|
|
1651
|
+
["informasjonskapsler", "cookies"]
|
|
1652
|
+
];
|
|
1653
|
+
|
|
1654
|
+
// lib/heuristic-prefilter.ts
|
|
1655
|
+
function literalIndex(all) {
|
|
1656
|
+
const distinct = [...new Set(all)].sort((a, b) => b.length - a.length);
|
|
1657
|
+
if (distinct.length === 0) {
|
|
1658
|
+
return { present: () => /* @__PURE__ */ new Set() };
|
|
1659
|
+
}
|
|
1660
|
+
const escape = (l) => l.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
1661
|
+
const any = new RegExp(`(?=(${distinct.map(escape).join("|")}))`, "g");
|
|
1662
|
+
const implies = /* @__PURE__ */ new Map();
|
|
1663
|
+
const impliedBy = (m) => {
|
|
1664
|
+
let list = implies.get(m);
|
|
1665
|
+
if (!list) {
|
|
1666
|
+
list = distinct.filter((l) => m.startsWith(l));
|
|
1667
|
+
implies.set(m, list);
|
|
1668
|
+
}
|
|
1669
|
+
return list;
|
|
1670
|
+
};
|
|
1671
|
+
return {
|
|
1672
|
+
present(lower) {
|
|
1673
|
+
const found = /* @__PURE__ */ new Set();
|
|
1674
|
+
for (const m of lower.matchAll(any)) {
|
|
1675
|
+
if (!found.has(m[1])) {
|
|
1676
|
+
impliedBy(m[1]).forEach((l) => found.add(l));
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
return found;
|
|
1680
|
+
}
|
|
1681
|
+
};
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
// lib/heuristic-detect.ts
|
|
1261
1685
|
var TEXT_LIMIT = 1e5;
|
|
1262
|
-
|
|
1263
|
-
|
|
1686
|
+
var DEFAULT_WINDOW = 150;
|
|
1687
|
+
var builtinLiterals;
|
|
1688
|
+
function literalsOf(pattern) {
|
|
1689
|
+
if (!builtinLiterals) {
|
|
1690
|
+
const fresh = DETECT_PATTERN_LITERALS.length === DETECT_PATTERNS.length;
|
|
1691
|
+
builtinLiterals = new Map(fresh ? DETECT_PATTERNS.map((p, i) => [patternOf(p), DETECT_PATTERN_LITERALS[i]]) : []);
|
|
1692
|
+
}
|
|
1693
|
+
return builtinLiterals.get(pattern) ?? [];
|
|
1694
|
+
}
|
|
1695
|
+
var index;
|
|
1696
|
+
var literalsIn = (lower) => (index ??= literalIndex(DETECT_PATTERN_LITERALS.flat())).present(lower);
|
|
1697
|
+
var truncate = (text) => (text || "").slice(0, TEXT_LIMIT);
|
|
1698
|
+
var forInput = (scoped, input) => !scoped.input || scoped.input === input;
|
|
1699
|
+
var stateless = (re) => new RegExp(re.source, re.flags.replace(/[gy]/g, ""));
|
|
1700
|
+
function toPredicate(test) {
|
|
1701
|
+
if (typeof test === "function") {
|
|
1702
|
+
return test;
|
|
1703
|
+
}
|
|
1704
|
+
const re = stateless(test);
|
|
1705
|
+
return (text) => re.test(text);
|
|
1706
|
+
}
|
|
1707
|
+
var compiledPatterns = /* @__PURE__ */ new WeakMap();
|
|
1708
|
+
var compiledNegatives = /* @__PURE__ */ new WeakMap();
|
|
1709
|
+
function compilePatterns(detectPatterns) {
|
|
1710
|
+
let compiled = compiledPatterns.get(detectPatterns);
|
|
1711
|
+
if (!compiled) {
|
|
1712
|
+
compiled = detectPatterns.map((p) => {
|
|
1713
|
+
const pattern = patternOf(p);
|
|
1714
|
+
const input = p instanceof RegExp ? void 0 : p.input;
|
|
1715
|
+
const global = pattern.flags.includes("g") ? pattern : new RegExp(pattern.source, `${pattern.flags}g`);
|
|
1716
|
+
return { id: pattern.toString(), pattern, global, input, literals: literalsOf(pattern) };
|
|
1717
|
+
});
|
|
1718
|
+
compiledPatterns.set(detectPatterns, compiled);
|
|
1719
|
+
}
|
|
1720
|
+
return compiled;
|
|
1721
|
+
}
|
|
1722
|
+
function compileNegatives(negatives) {
|
|
1723
|
+
let compiled = compiledNegatives.get(negatives);
|
|
1724
|
+
if (!compiled) {
|
|
1725
|
+
compiled = negatives.map((n) => {
|
|
1726
|
+
const pattern = n.pattern ? stateless(n.pattern) : null;
|
|
1727
|
+
const unless = n.unless ? toPredicate(n.unless) : null;
|
|
1728
|
+
return {
|
|
1729
|
+
...n,
|
|
1730
|
+
hits: (context) => (!pattern || pattern.test(context)) && !(unless && unless(context)),
|
|
1731
|
+
applies: n.appliesTo ? new Set(n.appliesTo.map(String)) : null
|
|
1732
|
+
};
|
|
1733
|
+
});
|
|
1734
|
+
compiledNegatives.set(negatives, compiled);
|
|
1735
|
+
}
|
|
1736
|
+
return compiled;
|
|
1737
|
+
}
|
|
1738
|
+
function negativeContext(text, start, end, negative) {
|
|
1739
|
+
if (negative.whole) {
|
|
1740
|
+
return text;
|
|
1741
|
+
}
|
|
1742
|
+
if (negative.lines === void 0) {
|
|
1743
|
+
const w = negative.window ?? DEFAULT_WINDOW;
|
|
1744
|
+
return text.slice(Math.max(0, start - w), end + w);
|
|
1745
|
+
}
|
|
1746
|
+
const lineEnd = (i) => {
|
|
1747
|
+
const next = text.indexOf("\n", i);
|
|
1748
|
+
return next === -1 ? text.length : next;
|
|
1749
|
+
};
|
|
1750
|
+
const [before, after] = Array.isArray(negative.lines) ? negative.lines : [negative.lines, negative.lines];
|
|
1751
|
+
let from = start > 0 ? text.lastIndexOf("\n", start - 1) + 1 : 0;
|
|
1752
|
+
let to = lineEnd(end);
|
|
1753
|
+
for (let i = 0; i < before; i++) {
|
|
1754
|
+
from = from >= 2 ? text.lastIndexOf("\n", from - 2) + 1 : 0;
|
|
1755
|
+
}
|
|
1756
|
+
for (let i = 0; i < after; i++) {
|
|
1757
|
+
to = to < text.length ? lineEnd(to + 1) : to;
|
|
1758
|
+
}
|
|
1759
|
+
return text.slice(from, to);
|
|
1760
|
+
}
|
|
1761
|
+
function checkHeuristicPatterns(allText, input, options = {}) {
|
|
1762
|
+
return matchHeuristicPatterns(allText, input, options, false);
|
|
1763
|
+
}
|
|
1764
|
+
function hasHeuristicPatterns(allText, input, options = {}) {
|
|
1765
|
+
return matchHeuristicPatterns(allText, input, options, true).patterns.length > 0;
|
|
1766
|
+
}
|
|
1767
|
+
function matchHeuristicPatterns(allText, input, { patterns: detectPatterns = DETECT_PATTERNS, negatives = DETECT_CONTEXT_NEGATIVES }, firstOnly) {
|
|
1768
|
+
if (input !== void 0 && input !== "popup" && input !== "page") {
|
|
1769
|
+
const got = Array.isArray(input) ? "a pattern list (pass it as the `patterns` option)" : JSON.stringify(input);
|
|
1770
|
+
throw new TypeError(`heuristic input must be 'popup', 'page' or undefined, got ${got}`);
|
|
1771
|
+
}
|
|
1772
|
+
allText = truncate(allText);
|
|
1264
1773
|
const patterns = [];
|
|
1265
1774
|
const snippets2 = [];
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1775
|
+
const suppressed = [];
|
|
1776
|
+
const applicable = compileNegatives(negatives).filter((n) => forInput(n, input));
|
|
1777
|
+
let present;
|
|
1778
|
+
const wholeHits = /* @__PURE__ */ new Map();
|
|
1779
|
+
const hitsAt = (n, start, end) => {
|
|
1780
|
+
if (!n.whole) {
|
|
1781
|
+
return n.hits(negativeContext(allText, start, end, n));
|
|
1782
|
+
}
|
|
1783
|
+
let hit = wholeHits.get(n);
|
|
1784
|
+
if (hit === void 0) {
|
|
1785
|
+
hit = n.hits(allText);
|
|
1786
|
+
wholeHits.set(n, hit);
|
|
1787
|
+
}
|
|
1788
|
+
return hit;
|
|
1789
|
+
};
|
|
1790
|
+
for (const d of compilePatterns(detectPatterns)) {
|
|
1791
|
+
if (!forInput(d, input)) {
|
|
1792
|
+
continue;
|
|
1793
|
+
}
|
|
1794
|
+
if (d.literals.length) {
|
|
1795
|
+
const inText = present ??= literalsIn(allText.toLowerCase());
|
|
1796
|
+
if (!d.literals.some((l) => inText.has(l))) {
|
|
1797
|
+
continue;
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
const own = applicable.filter((n) => !n.applies || n.applies.has(d.id));
|
|
1801
|
+
const matched = [];
|
|
1802
|
+
const dropped = /* @__PURE__ */ new Set();
|
|
1803
|
+
let found = false;
|
|
1804
|
+
let kept = own.length === 0;
|
|
1805
|
+
for (const m of allText.matchAll(d.global)) {
|
|
1806
|
+
found = true;
|
|
1807
|
+
if (!kept) {
|
|
1808
|
+
const start = m.index ?? 0;
|
|
1809
|
+
const hit = own.find((n) => hitsAt(n, start, start + m[0].length));
|
|
1810
|
+
if (hit) {
|
|
1811
|
+
dropped.add(hit.name);
|
|
1812
|
+
} else {
|
|
1813
|
+
kept = true;
|
|
1273
1814
|
}
|
|
1274
1815
|
}
|
|
1816
|
+
if (kept && firstOnly) {
|
|
1817
|
+
break;
|
|
1818
|
+
}
|
|
1819
|
+
matched.push(m[0].substring(0, 200));
|
|
1275
1820
|
}
|
|
1821
|
+
if (!found) {
|
|
1822
|
+
continue;
|
|
1823
|
+
}
|
|
1824
|
+
if (!kept) {
|
|
1825
|
+
dropped.forEach((negative) => suppressed.push({ pattern: d.id, negative }));
|
|
1826
|
+
continue;
|
|
1827
|
+
}
|
|
1828
|
+
patterns.push(d.id);
|
|
1829
|
+
if (firstOnly) {
|
|
1830
|
+
break;
|
|
1831
|
+
}
|
|
1832
|
+
snippets2.push(...matched);
|
|
1276
1833
|
}
|
|
1277
|
-
return { patterns, snippets: snippets2 };
|
|
1278
|
-
}
|
|
1279
|
-
function hasHeuristicPatterns(allText, detectPatterns = DETECT_PATTERNS) {
|
|
1280
|
-
const text = allText.slice(0, TEXT_LIMIT);
|
|
1281
|
-
return detectPatterns.some((p) => text.search(p) !== -1);
|
|
1834
|
+
return { patterns, snippets: snippets2, suppressed };
|
|
1282
1835
|
}
|
|
1836
|
+
|
|
1837
|
+
// lib/heuristic-classify.ts
|
|
1283
1838
|
function classifyButtons(buttons) {
|
|
1284
1839
|
for (const button of buttons) {
|
|
1285
1840
|
button.regexClassification = classifyButtonTextRegex(button.text);
|
|
1286
1841
|
}
|
|
1287
1842
|
}
|
|
1288
|
-
function isExcludedPopup(popupText, excludePatterns = DETECT_NEVER_MATCH_PATTERNS) {
|
|
1289
|
-
if (!popupText) {
|
|
1290
|
-
return false;
|
|
1291
|
-
}
|
|
1292
|
-
const truncated = popupText.slice(0, TEXT_LIMIT);
|
|
1293
|
-
return excludePatterns.some((p) => p.test(truncated));
|
|
1294
|
-
}
|
|
1295
1843
|
function classifyPopup(buttons) {
|
|
1296
1844
|
const { reject, settings, accept, acknowledge } = buttons.reduce(
|
|
1297
1845
|
(acc, button) => {
|
|
@@ -1354,6 +1902,8 @@
|
|
|
1354
1902
|
// lib/heuristics.ts
|
|
1355
1903
|
var BUTTON_LIKE_ELEMENT_SELECTOR = 'button, input[type="button"], input[type="submit"], a, [role="button"], [class*="button"]';
|
|
1356
1904
|
var POPUP_SEARCH_MAX_TIME = 100;
|
|
1905
|
+
var FRAGMENT_NEGATIVES = DETECT_CONTEXT_NEGATIVES.filter((n) => !n.whole);
|
|
1906
|
+
var hasFragmentPatterns = (text) => hasHeuristicPatterns(text, "popup", { negatives: FRAGMENT_NEGATIVES });
|
|
1357
1907
|
var ACCEPTED_LEVELS = {
|
|
1358
1908
|
off: [],
|
|
1359
1909
|
reject: ["reject"],
|
|
@@ -1392,7 +1942,7 @@
|
|
|
1392
1942
|
let result = consentPopups.get(popup);
|
|
1393
1943
|
if (result === void 0) {
|
|
1394
1944
|
const popupText = popup.text.trim();
|
|
1395
|
-
result = !!popupText &&
|
|
1945
|
+
result = !!popupText && hasHeuristicPatterns(popupText, "popup");
|
|
1396
1946
|
consentPopups.set(popup, result);
|
|
1397
1947
|
}
|
|
1398
1948
|
return result;
|
|
@@ -1529,7 +2079,7 @@
|
|
|
1529
2079
|
}
|
|
1530
2080
|
function toPopupRoot(el, shadowHosts) {
|
|
1531
2081
|
const text = getElementText(el);
|
|
1532
|
-
if (!text || !
|
|
2082
|
+
if (!text || !hasFragmentPatterns(text)) {
|
|
1533
2083
|
return null;
|
|
1534
2084
|
}
|
|
1535
2085
|
const popup = toPopupData(el, shadowHosts, text);
|
|
@@ -1550,7 +2100,7 @@
|
|
|
1550
2100
|
return null;
|
|
1551
2101
|
}
|
|
1552
2102
|
function expandPopupFragment(popup, shadowHosts) {
|
|
1553
|
-
if (
|
|
2103
|
+
if (hasFragmentPatterns(popup.text) && hasPopupButtons(popup.text, popup.buttons)) {
|
|
1554
2104
|
return popup;
|
|
1555
2105
|
}
|
|
1556
2106
|
const parent = getComposedParent(popup.element);
|
|
@@ -2475,13 +3025,13 @@
|
|
|
2475
3025
|
return false;
|
|
2476
3026
|
}
|
|
2477
3027
|
async detectCmp() {
|
|
2478
|
-
return this.elementExists("#_evidon_banner");
|
|
3028
|
+
return this.elementExists("#_evidon_banner, #_evidon-barrier-wrapper");
|
|
2479
3029
|
}
|
|
2480
3030
|
async detectPopup() {
|
|
2481
|
-
return this.elementVisible("#_evidon_banner", "any");
|
|
3031
|
+
return this.elementVisible("#_evidon_banner, #_evidon-barrier-wrapper #_evidon-banner", "any");
|
|
2482
3032
|
}
|
|
2483
3033
|
async optOut() {
|
|
2484
|
-
if (await this.click("#_evidon-decline-button")) {
|
|
3034
|
+
if (await this.click("#_evidon-decline-button, #_evidon-barrier-declinebutton, #_evidon_banner #RejectLink")) {
|
|
2485
3035
|
return true;
|
|
2486
3036
|
}
|
|
2487
3037
|
hideElements(getStyleElement(), "#evidon-prefdiag-overlay,#evidon-prefdiag-background,#_evidon-background");
|
|
@@ -2492,7 +3042,7 @@
|
|
|
2492
3042
|
return true;
|
|
2493
3043
|
}
|
|
2494
3044
|
async optIn() {
|
|
2495
|
-
return await this.click("#_evidon-accept-button");
|
|
3045
|
+
return await this.click("#_evidon-accept-button, #_evidon-banner-acceptbutton");
|
|
2496
3046
|
}
|
|
2497
3047
|
};
|
|
2498
3048
|
|
|
@@ -2759,9 +3309,6 @@
|
|
|
2759
3309
|
constructor() {
|
|
2760
3310
|
super(...arguments);
|
|
2761
3311
|
this.name = "tiktok.com";
|
|
2762
|
-
this.runContext = {
|
|
2763
|
-
urlPattern: "tiktok"
|
|
2764
|
-
};
|
|
2765
3312
|
}
|
|
2766
3313
|
get hasSelfTest() {
|
|
2767
3314
|
return true;
|
|
@@ -3488,7 +4035,7 @@
|
|
|
3488
4035
|
detectHeuristics() {
|
|
3489
4036
|
if (this.config.enableHeuristicDetection) {
|
|
3490
4037
|
this.config.performanceLoggingEnabled && performance.mark("detectHeuristicsStart");
|
|
3491
|
-
const { patterns, snippets: snippets2 } = checkHeuristicPatterns(document.documentElement?.innerText || "");
|
|
4038
|
+
const { patterns, snippets: snippets2 } = checkHeuristicPatterns(document.documentElement?.innerText || "", "page");
|
|
3492
4039
|
if (patterns.length > 0 && (patterns.length !== this.state.heuristicPatterns.length || this.state.heuristicPatterns.some((p, i) => p !== patterns[i]))) {
|
|
3493
4040
|
this.config.logs.lifecycle && console.log("Heuristic patterns found", patterns, snippets2);
|
|
3494
4041
|
this.updateState({ heuristicPatterns: patterns, heuristicSnippets: snippets2 });
|