@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
|
@@ -440,6 +440,8 @@
|
|
|
440
440
|
EVAL_TEALIUM_2: () => utag.gdpr.setConsentValue(true) || true,
|
|
441
441
|
EVAL_TEALIUM_3: () => utag.gdpr.getConsentState() !== 1,
|
|
442
442
|
EVAL_TEALIUM_DONOTSELL_CHECK: () => utag.gdpr.dns?.getDnsState() !== 1,
|
|
443
|
+
// 0 means no stored decision; otherwise the user reopened the prompt themselves
|
|
444
|
+
EVAL_TEALIUM_NO_DECISION: () => utag.gdpr.getConsentState() === 0,
|
|
443
445
|
EVAL_TESTCMP_STEP: () => !!document.querySelector("#reject-all"),
|
|
444
446
|
EVAL_TESTCMP_0: () => window.results.results[0] === "button_clicked",
|
|
445
447
|
EVAL_TESTCMP_COSMETIC_0: () => window.results.results[0] === "banner_hidden",
|
|
@@ -454,7 +456,8 @@
|
|
|
454
456
|
EVAL_USERCENTRICS_API_6: () => UC_UI.areAllConsentsAccepted() === false,
|
|
455
457
|
EVAL_USERCENTRICS_BUTTON_0: () => JSON.parse(localStorage.getItem("usercentrics")).consents.every((c) => c.isEssential || !c.consentStatus),
|
|
456
458
|
EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll("label[id$=cookies-deny-label]")).forEach((e) => e.click()) || true,
|
|
457
|
-
EVAL_WBD_LTP_CLOSE: () => document.querySelector("dialog#ltp-dialog").close() || true
|
|
459
|
+
EVAL_WBD_LTP_CLOSE: () => document.querySelector("dialog#ltp-dialog").close() || true,
|
|
460
|
+
EVAL_ZOHO_TEST: () => localStorage.getItem("zglobal_Acookie_optOut") === "3"
|
|
458
461
|
};
|
|
459
462
|
function getFunctionBody(snippetFunc) {
|
|
460
463
|
const snippetStr = snippetFunc.toString();
|
|
@@ -462,18 +465,27 @@
|
|
|
462
465
|
}
|
|
463
466
|
|
|
464
467
|
// lib/heuristic-patterns.ts
|
|
468
|
+
var patternOf = (p) => p instanceof RegExp ? p : p.pattern;
|
|
469
|
+
var BY_CONTINUING_PRIVACY = /(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi;
|
|
470
|
+
var ACCEPT_ALL = /accept all/gi;
|
|
471
|
+
var USE_OF_COOKIES = /use of cookies/gi;
|
|
472
|
+
var UTILISATION_DES_COOKIES = /utilisation.{0,100}des.{0,100}cookies/gi;
|
|
473
|
+
var ACCEPTEZ_UTILISATION = /acceptez.{0,100}l.{0,100}utilisation/gi;
|
|
474
|
+
var VERWENDUNG_VON_COOKIES = /verwendung.{0,100}von.{0,100}cookies/gi;
|
|
475
|
+
var DE_COOKIE_VERB = /\b(?:nutzen|nutzt|verwenden|verwendet|setzen|setzt|benutzen|benutzt|speichert|platzieren)\b(?: \S+){0,4} cookies\b/gi;
|
|
476
|
+
var GEBRUIK_VAN_COOKIES = /gebruik.{0,100}van.{0,100}cookies/gi;
|
|
465
477
|
var DETECT_PATTERNS = [
|
|
466
478
|
/accept cookies/gi,
|
|
467
|
-
|
|
479
|
+
ACCEPT_ALL,
|
|
468
480
|
/reject all/gi,
|
|
469
481
|
/only necessary cookies/gi,
|
|
470
482
|
// "only necessary" is probably too broad
|
|
471
483
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
472
|
-
|
|
484
|
+
BY_CONTINUING_PRIVACY,
|
|
473
485
|
// up to two qualifiers are common: "optional", "essential", "analytics", "google analytics", "third party", ...
|
|
474
486
|
/we (?:use|serve)(?: \w+){0,2} cookies/gi,
|
|
475
487
|
/we are using cookies/gi,
|
|
476
|
-
|
|
488
|
+
USE_OF_COOKIES,
|
|
477
489
|
/website uses cookies to enhance your browsing experience/gi,
|
|
478
490
|
/(?:this|our) (?:web)?site.{0,100}cookies/gi,
|
|
479
491
|
/cookies (?:and|or) .{0,100} technologies/gi,
|
|
@@ -484,6 +496,33 @@
|
|
|
484
496
|
/we.{0,100}store.{0,100}information.{0,100}such as.{0,100}cookies/gi,
|
|
485
497
|
/store and\/or access information.{0,100}on a device/gi,
|
|
486
498
|
/personalised ads and content, ad and content measurement/gi,
|
|
499
|
+
// TCF wording: "store and/or access information", "and our partners ask for your consent", "we and our N partners"
|
|
500
|
+
/\b(?:store|stores|storing) and\/or access(?:ing)? information\b/gi,
|
|
501
|
+
/\band our partners ask for your consent\b/gi,
|
|
502
|
+
/\bwe and (?:our|up to) (?:\d+ )?(?:partners|vendors)\b/gi,
|
|
503
|
+
// a partner count, in each language: "our 186 partners", "unseren 107 Partnern", "nuestros 1064 socios"
|
|
504
|
+
/\b(?:our|unseren|onze|nos|nuestros|i nostri) \d{2,4} (?:partners|partnern|partner|partenaires|socios|vendors|fornitori)\b/gi,
|
|
505
|
+
/\b\d{2,4} iab[- ]partner/gi,
|
|
506
|
+
// "technologies like cookies", in each language
|
|
507
|
+
/\btechnolog(?:ies|ien|ieën|ías|ie) (?:like|such as|wie|zoals|como(?: las)?|telles que(?: les)?|come(?: i)?) cookies?\b/gi,
|
|
508
|
+
/\buses (?:\S+ ){0,2}cookies\b/gi,
|
|
509
|
+
/\b(?:like|want) to (?:use|set) (?:\S+ ){0,2}cookies\b/gi,
|
|
510
|
+
/\b(?:optional|additional|non-essential) cookies\b/gi,
|
|
511
|
+
/\bstoring of cookies\b|\bplaced cookies\b/gi,
|
|
512
|
+
/\b(?:store|stores) and access (?:data|information) on your device\b|\baccess and store (?:data|information) on your device\b/gi,
|
|
513
|
+
/\bwe use (?:\S+ ){1,4}cookies\b/gi,
|
|
514
|
+
// US privacy notices: opt-out sentences, not the footer link labels
|
|
515
|
+
/\byou (?:can|may) opt[- ]out of (?:the |this )?(?:sale|sharing|use|selling)\b/gi,
|
|
516
|
+
/\b(?:if you wish to|to) opt[- ]out of the sale\b/gi,
|
|
517
|
+
/\bthis website or its third[- ]party tools (?:process|use)\b/gi,
|
|
518
|
+
/["“]?(?:share|sell)["”]? or ["“]?(?:sell|share)["”]? (?:your )?(?:personal )?information\b/gi,
|
|
519
|
+
/\bresidents have (?:certain )?rights with regard to the sale\b/gi,
|
|
520
|
+
/\bwe use technologies (?:on this website )?(?:that may )?(?:to )?collect\b/gi,
|
|
521
|
+
// pay-or-consent walls
|
|
522
|
+
/\bcontinue reading with advertising\b|\b(?:with|mit) (?:advertising|werbung) (?:and|und) tracking\b/gi,
|
|
523
|
+
/\bconsent and continue\b/gi,
|
|
524
|
+
// preference centres are often in the page but hidden, so popup text only
|
|
525
|
+
{ pattern: /\bstore or retrieve information on your browser\b|\bstockées dans votre navigateur ou récupérées\b/gi, input: "popup" },
|
|
487
526
|
// it might be tempting to add the patterns below, but they cause too many false positives. Don't do it :)
|
|
488
527
|
// /cookies? settings/i,
|
|
489
528
|
// /cookies? preferences/i,
|
|
@@ -499,26 +538,32 @@
|
|
|
499
538
|
/consentement.{0,100}à.{0,100}tout.{0,100}moment/gi,
|
|
500
539
|
/votre.{0,100}consentement/gi,
|
|
501
540
|
/accepter.{0,100}tout/gi,
|
|
502
|
-
|
|
541
|
+
UTILISATION_DES_COOKIES,
|
|
503
542
|
/cookies.{0,100}ou.{0,100}technologies/gi,
|
|
504
|
-
|
|
543
|
+
ACCEPTEZ_UTILISATION,
|
|
505
544
|
/continuer sans accepter/gi,
|
|
506
545
|
/tout refuser/gi,
|
|
507
546
|
/(?:refuser|rejeter) tous les cookies/gi,
|
|
508
|
-
|
|
547
|
+
// not "je refuse d'…" in a headline
|
|
548
|
+
/je refuse(?! d['’e])/gi,
|
|
509
549
|
/refuser et continuer/gi,
|
|
510
550
|
/refuser les cookies/gi,
|
|
511
551
|
/seulement nécessaires/gi,
|
|
512
552
|
/je désactive les finalités non essentielles/gi,
|
|
513
553
|
/cookies essentiels uniquement/gi,
|
|
514
554
|
/nécessaires uniquement/gi,
|
|
555
|
+
/\b(?:stocker|stockons) et\/ou (?:accéder|accédons)\b/gi,
|
|
556
|
+
/\bnos partenaires demandent votre consentement\b/gi,
|
|
557
|
+
/\bconsentez à l.utilisation (?:de |des )?cookies\b|\bdépôt (?:de|des) cookies\b/gi,
|
|
558
|
+
/\bles cookies nous permettent\b|\bnos partenaires et nous(?:-mêmes)?\b/gi,
|
|
559
|
+
/\baccepter (?:&|et) fermer\b/gi,
|
|
515
560
|
// DE
|
|
516
561
|
/wir.{0,100}verwenden.{0,100}cookies/gi,
|
|
517
562
|
/wir.{0,100}und.{0,100}unsere.{0,100}partner/gi,
|
|
518
|
-
/zugriff
|
|
563
|
+
/zugriff auf informationen auf/gi,
|
|
519
564
|
/inhalte.{0,100}messung.{0,100}von.{0,100}werbeleistung.{0,100}und/gi,
|
|
520
565
|
/cookies.{0,100}und.{0,100}andere/gi,
|
|
521
|
-
|
|
566
|
+
VERWENDUNG_VON_COOKIES,
|
|
522
567
|
/wir.{0,100}nutzen.{0,100}cookies/gi,
|
|
523
568
|
/verwendet.{0,100}cookies/gi,
|
|
524
569
|
/sie.{0,100}können.{0,100}ihre.{0,100}auswahl/gi,
|
|
@@ -531,8 +576,20 @@
|
|
|
531
576
|
/nur funktionale cookies akzeptieren/gi,
|
|
532
577
|
/optionale ablehnen/gi,
|
|
533
578
|
/zustimmung verweigern/gi,
|
|
579
|
+
/\bspeichern und\/oder (?:zugreifen|abrufen)\b/gi,
|
|
580
|
+
/\bunsere partner bitten um ihre zustimmung\b/gi,
|
|
581
|
+
DE_COOKIE_VERB,
|
|
582
|
+
/\b(?:werden|wird) (?:\S+ ){0,3}cookies (?:verwendet|eingesetzt|gesetzt|genutzt)\b/gi,
|
|
583
|
+
/\bcookies? zum einsatz\b|\beinsatz von cookies\b/gi,
|
|
584
|
+
/\beinverstanden\b.{0,60}\bcookies\b|\bcookies\b.{0,80}\beinverstanden\b/gi,
|
|
585
|
+
/\b(?:alle|alles) (?:cookies |optionalen \S+ )?(?:akzeptieren|zulassen|erlauben|zustimmen)\b/gi,
|
|
586
|
+
/\bzustimmen und weiter\b|\bweiter,? ohne zu (?:akzeptieren|zustimmen)\b/gi,
|
|
587
|
+
/\b(?:einwilligung|zustimmung) (?:zu|zur|in die) (?:\S+ )?cookies\b|\bcookie-(?:zustimmung|einwilligung)\b/gi,
|
|
588
|
+
/\btracking-technologien\b/gi,
|
|
589
|
+
/\bakzeptier\w* (?:du |sie )?(?:die )?verwendung (?:\S+ )?cookies\b/gi,
|
|
590
|
+
/\bmit werbetracking weiterlesen\b|\bweiter mit werbung\b|\bcon tracking e annunci\b/gi,
|
|
534
591
|
// NL
|
|
535
|
-
|
|
592
|
+
GEBRUIK_VAN_COOKIES,
|
|
536
593
|
/(?:we|wij).{0,100}gebruiken.{0,100}cookies.{0,100}om/gi,
|
|
537
594
|
/cookies.{0,100}en.{0,100}vergelijkbare/gi,
|
|
538
595
|
/(?:alles|cookies).{0,100}(?:afwijzen|weigeren|verwerpen)/gi,
|
|
@@ -542,6 +599,13 @@
|
|
|
542
599
|
/doorgaan zonder (?:te accepteren|akkoord te gaan)/gi,
|
|
543
600
|
/alleen.{0,100}(?:optionele|functionele|functioneel|noodzakelijke|essentiële).{0,100}cookies/gi,
|
|
544
601
|
/wijs alles af/gi,
|
|
602
|
+
/\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,
|
|
603
|
+
/\bonze partners vragen om (?:jouw|uw|je) toestemming\b/gi,
|
|
604
|
+
/\bwij en onze (?:\d+ )?partners\b/gi,
|
|
605
|
+
/\b(?:gebruiken|gebruikt|plaatsen|plaatst)\b(?: \S+){0,3} cookies\b/gi,
|
|
606
|
+
/\baccepteer (?:alles|alle cookies)\b/gi,
|
|
607
|
+
// Dutch words only: "tracking cookies" and "marketing cookies" are also English prose and footer links
|
|
608
|
+
/\b(?:analytische|functionele|essentiële|noodzakelijke) cookies\b/gi,
|
|
545
609
|
// Spanish (ES)
|
|
546
610
|
/(si|al) contin[úu]a[sr]?( navegando)?.{0,100} cookie/gi,
|
|
547
611
|
/(usamos|utilizar?|utilizamos)( (tanto|las))?.{0,20}cookie/gi,
|
|
@@ -558,6 +622,15 @@
|
|
|
558
622
|
/nosotros y nuestros( \d+)? (socios|proveedores).{0,180} cookies/gi,
|
|
559
623
|
/recopilamos y almacenamos datos de usted y de su dispositivo/gi,
|
|
560
624
|
/utilizamos tecnolog[ií]as como las cookies/gi,
|
|
625
|
+
/\b(?:almacenar|almacenamos) y\/o (?:acceder|accedemos)\b/gi,
|
|
626
|
+
/\bnuestros socios solicitan su consentimiento\b/gi,
|
|
627
|
+
/\b(?:tanto nosotros como|nosotros y) nuestros (?:\d+ )?socios\b/gi,
|
|
628
|
+
/\b(?:aceptar|rechazar) todas\b|\bcontinuar sin aceptar\b|\bsolo las necesarias\b/gi,
|
|
629
|
+
/\bacept\w* (?:\S+ ){0,3}uso de (?:las )?cookies\b/gi,
|
|
630
|
+
/\bcookies (?:técnicas|analíticas|propias|de terceros|opcionales|necesarias)\b/gi,
|
|
631
|
+
/\blas cookies nos (?:ayudan|permiten)\b/gi,
|
|
632
|
+
/\b(?:instalamos|empleamos)\b(?: \S+){0,4} cookies\b/gi,
|
|
633
|
+
/\bacept(?:a|ar|as)? (?:el uso de |las )?(?:\S+ )?cookies\b|\bnecesitamos usar cookies\b/gi,
|
|
561
634
|
// Polish (PL)
|
|
562
635
|
// examples:
|
|
563
636
|
// wykorzystuje pliki cookie (uses cookies)
|
|
@@ -586,10 +659,11 @@
|
|
|
586
659
|
// Catalan (CA)
|
|
587
660
|
/cookies pròpies i de tercers/gi,
|
|
588
661
|
/utilitzem galetes/gi,
|
|
589
|
-
|
|
662
|
+
/únicament utilitza galetes pròpies amb finalitat tècnica\b/gi,
|
|
590
663
|
/este lloc web utilitza només cookies tècniques necessàries per al seu funcionament/gi,
|
|
591
664
|
/utilitza cookies tècniques,\s*de personalització i anàlisi/gi,
|
|
592
665
|
/utilitzem cookies i altres tecnologies/gi,
|
|
666
|
+
/\b(?:utilitz\w*|fa servir|fem servir|usem)\b(?: \S+){0,3} (?:cookies|galetes)\b/gi,
|
|
593
667
|
// Basque (EU)
|
|
594
668
|
/cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu/gi,
|
|
595
669
|
/cookie propioak eta hirugarrenen cookieak erabiltzen ditugu/gi,
|
|
@@ -619,7 +693,18 @@
|
|
|
619
693
|
/(?:usiamo|utilizziamo).{0,20}cookie/gi,
|
|
620
694
|
/sito.{0,50}(?:usa|utilizza).{0,20}cookie/gi,
|
|
621
695
|
/noi e i nostri.{0,20}partner.{0,100}cookie/gi,
|
|
622
|
-
|
|
696
|
+
/\b(?:utilizziamo|usiamo|impieghiamo|installiamo)\b(?: \S+){0,3} cookies?\b/gi,
|
|
697
|
+
/\b(?:utilizza|utilizzano|usa|usano|impiega|installa|fa uso di)\b(?: \S+){0,3} cookies?\b/gi,
|
|
698
|
+
/\bcookies? (?:tecnici|di profilazione|di terze parti|analitici|statistici|di marketing)\b/gi,
|
|
699
|
+
/\b(?:acconsent|accett)\w*\b.{0,40}\b(?:uso|utilizzo|installazione)\b.{0,15}\bcookies?\b/gi,
|
|
700
|
+
/\b(?:continuando|proseguendo)(?: la| nella)? navigazione\b.{0,80}\b(?:accett|acconsent)\w*/gi,
|
|
701
|
+
/\b(?:accetta|accetto|accettare|rifiuta|rifiuto|rifiutare)(?: tutti| tutto)\b/gi,
|
|
702
|
+
/\b(?:continua|prosegui|chiudi) senza accettare\b/gi,
|
|
703
|
+
/\brifiuta e abbonati\b/gi,
|
|
704
|
+
/\bconsenso (?:all.(?:uso|utilizzo) (?:dei |di )?)?cookies?\b/gi,
|
|
705
|
+
/\b(?:insieme ai|con i) nostri (?:\d+ )?partner\b/gi,
|
|
706
|
+
/\bterze parti selezionate\b/gi,
|
|
707
|
+
/\b(?:archiviare|archiviamo|memorizzare|memorizziamo) e\/o (?:accedere|accediamo)\b/gi,
|
|
623
708
|
// Swedish (SV)
|
|
624
709
|
// e.g. "vi använder cookies", "vi använder spårningstekniker såsom cookies", "webbplatsen använder kakor"
|
|
625
710
|
/(?:vi|webbplatsen|webbplats|sajten|sidan)\s+använder.{0,60}(?:cookies|kakor)/gi,
|
|
@@ -874,26 +959,12 @@
|
|
|
874
959
|
// Russian (RU): paywall/subscription wording, e.g. "отказаться от подписки", "оплатить"
|
|
875
960
|
/подписатьс|подписк|оплатит|оплачива/is
|
|
876
961
|
];
|
|
877
|
-
var DETECT_NEVER_MATCH_PATTERNS = [
|
|
878
|
-
// e.g. "age verification", "age confirmation", "age check", "age gate", "age restriction"
|
|
879
|
-
/age\s+(?:verification|confirmation|check|gate|restriction)/i,
|
|
880
|
-
// e.g. "over 18 years", "at least 21 years", "older than 21", "18+"
|
|
881
|
-
/(?:over|above|at\s*least|minimum|older\s+than)\s*(?:18|21)\s*(?:years|yo|y\.?o\.?|\+)?/i,
|
|
882
|
-
// e.g. "18 years of age", "18+ years old", "21 years or older"
|
|
883
|
-
/(?:18|21)\s*(?:\+|years?)\s*(?:of\s*age|or\s*older|or\s*above)/i,
|
|
884
|
-
// e.g. "I am 18+", "I am over 18", "I'm 21 or older"
|
|
885
|
-
/(?:i'?m|i\s*am)\s*(?:over|above|at\s*least)?\s*(?:18|21)(?:\+|\s*(?:or\s*older|years))?/i,
|
|
886
|
-
// e.g. "you must be 18", "users must be at least 21", "visitors must be over 18"
|
|
887
|
-
/(?:you|users?|visitors?)\s+must\s+be\s+(?:over|above|at\s*least)?\s*(?:18|21)/i,
|
|
888
|
-
// e.g. "adult oriented material", "adult content", "adult-only website"
|
|
889
|
-
/adult[\s-]+(?:oriented|only|content|material|websites?)/i
|
|
890
|
-
];
|
|
891
962
|
var SETTINGS_PATTERNS = [
|
|
892
963
|
// Multilingual "open customization" patterns: a customization verb next to a
|
|
893
964
|
// cookie/preference/settings/options/details/purposes noun (both word orders).
|
|
894
965
|
// The negative lookahead avoids policy links and save/confirm/accept phrases (those are accept/acknowledge/other).
|
|
895
|
-
/^(?!.*\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)
|
|
896
|
-
/^(?!.*\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)
|
|
966
|
+
/^(?!.*\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,
|
|
967
|
+
/^(?!.*\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,
|
|
897
968
|
// settings noun + cookies, e.g. "paramètres des cookies", "ajustes de cookies", "instellingen voor cookies en diensten"
|
|
898
969
|
/^(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,
|
|
899
970
|
"settings",
|
|
@@ -1249,41 +1320,518 @@
|
|
|
1249
1320
|
"\u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C"
|
|
1250
1321
|
];
|
|
1251
1322
|
|
|
1252
|
-
// lib/heuristic-
|
|
1323
|
+
// lib/heuristic-negatives.ts
|
|
1324
|
+
var COOKIE_CHOICE = [
|
|
1325
|
+
"\\b(?:accept|reject|decline|refuse|deny|allow|manage|customi[sz]e)\\b[^\\n]{0,25}\\bcookies?\\b",
|
|
1326
|
+
"\\b(?:reject|decline|deny|refuse) all\\b",
|
|
1327
|
+
"\\b(?:essential|necessary|required) (?:cookies )?only\\b|\\bonly (?:essential|necessary|required)\\b",
|
|
1328
|
+
"\\bcookies? (?:notice|settings|preferences|banner)\\b",
|
|
1329
|
+
"\\b(?:alle )?(?:cookies )?ablehnen\\b",
|
|
1330
|
+
"\\b(?:alles |alle cookies )?(?:weigeren|weiger|afwijzen)\\b",
|
|
1331
|
+
"\\b(?:tout )?refuser\\b",
|
|
1332
|
+
"\\brechazar(?: todas?)?\\b",
|
|
1333
|
+
"\\brifiuta(?: tutti)?\\b",
|
|
1334
|
+
// purposes and vendors as a button or heading line: some consent dialogs ask "under 18?"
|
|
1335
|
+
"^[^\\n]{0,40}\\b(?:purposes|finalit\xE9s|prop\xF3sitos|zwecke|doeleinden|finalit\xE0|vendors|fournisseurs|proveedores|leveranciers|fornitori)(?!\\w)[^\\n]{0,10}$",
|
|
1336
|
+
"\\b(?:legitimate (?:business )?interest|int\xE9r\xEAt l\xE9gitime|inter\xE9s leg\xEDtimo|berechtigtes interesse|gerechtvaardigd belang|legittimo interesse)\\b",
|
|
1337
|
+
"\\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"
|
|
1338
|
+
].join("|");
|
|
1339
|
+
var BARE_ACCEPT = [
|
|
1340
|
+
"\\b(?:accept|allow) all\\b",
|
|
1341
|
+
"\\b(?:alle )?(?:cookies )?(?:akzeptieren|erlauben|zulassen)\\b",
|
|
1342
|
+
"\\b(?:alles |alle cookies )?(?:accepteren|accepteer|toestaan)\\b",
|
|
1343
|
+
"\\b(?:tout )?accepter\\b",
|
|
1344
|
+
"\\baceptar(?: todas?)?\\b",
|
|
1345
|
+
"\\baccetta(?: tutti)?\\b"
|
|
1346
|
+
].join("|");
|
|
1347
|
+
var COOKIE_CHOICE_RE = new RegExp(COOKIE_CHOICE, "im");
|
|
1348
|
+
var CONSENT_CHOICE = new RegExp(`${COOKIE_CHOICE}|${BARE_ACCEPT}`, "im");
|
|
1349
|
+
var AGE_WORDING = new RegExp(
|
|
1350
|
+
[
|
|
1351
|
+
"\\b(?:over|above|at least|older than|minimum(?: age of)?)\\s*(?:18|21|eighteen)\\b",
|
|
1352
|
+
// "18+" only with age words after it: a bare "18+" also appears in cookie banners on adult sites
|
|
1353
|
+
"\\b(?:18|21)\\+?\\s*(?:years?(?: of age| old)?|yo|or older|or over)\\b",
|
|
1354
|
+
"\\b(?:you|users?|visitors?) must be (?:over |above |at least )?(?:18|21)\\b",
|
|
1355
|
+
"\\b(?:i'?m|i am) (?:over |at least )?(?:18|21)\\b",
|
|
1356
|
+
"\\bage (?:verification|confirmation|check|gate|restriction)\\b",
|
|
1357
|
+
"\\b(?:adults? only|adult[\\s-](?:oriented|content|material|website)|legal age|age of majority|not a minor|minors)\\b",
|
|
1358
|
+
"\\b(?:18|21) jahre\\b",
|
|
1359
|
+
"\\balters(?:beschr\xE4nkung|best\xE4tigung|verifikation|pr\xFCfung|kontrolle)",
|
|
1360
|
+
"\\b(?:vollj\xE4hrig|f\xFCr erwachsene|minderj\xE4hrige)\\b",
|
|
1361
|
+
"\\b(?:18|21) jaar\\b",
|
|
1362
|
+
"\\b(?:volwassenen|meerderjarig|minderjarigen|leeftijdsverificatie)\\b",
|
|
1363
|
+
"\\b(?:18|21) ans\\b",
|
|
1364
|
+
// no \\b before an accented letter: without the u flag it is not a word character
|
|
1365
|
+
"\\b(?:pour adultes|v\xE9rification de l.\xE2ge|mineurs)\\b|\xE2ge l\xE9gal\\b",
|
|
1366
|
+
"\\b(?:18|21) a\xF1os\\b",
|
|
1367
|
+
"\\b(?:mayor(?:es)? de edad|menores de edad|para adultos|verificaci\xF3n de edad)\\b",
|
|
1368
|
+
"\\b(?:18|21) anni\\b",
|
|
1369
|
+
"\\b(?:maggiorenne|minorenni|per adulti)\\b|\\bverifica dell.et\xE0(?!\\w)"
|
|
1370
|
+
].join("|"),
|
|
1371
|
+
"i"
|
|
1372
|
+
);
|
|
1373
|
+
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;
|
|
1374
|
+
var DISMISS_END = /[.!?]\s+(?:ok(?:ay)?|got it|i agree|accept)\s*!?\s*$|\[\s*[x×]\s*\]|^\s*[x×✕]\s*$/im;
|
|
1375
|
+
var NOTICE_CONTROL = new RegExp(`${CONSENT_CHOICE.source}|${DISMISS_LINE.source}|${DISMISS_END.source}`, "im");
|
|
1376
|
+
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;
|
|
1377
|
+
var NOTICE_OWN_CONTROL = new RegExp(
|
|
1378
|
+
[
|
|
1379
|
+
"\\bcookies? verwalten\\b|\\bcookie-?(?:einstellungen|pr\xE4ferenzen)\\b|\\beinstellungen verwalten\\b",
|
|
1380
|
+
"\\bconfigura(?:r|ci\xF3n de)(?: las)? cookies\\b|\\bgestionar(?: las)? cookies\\b|\\bpersonalizar(?: las)? cookies\\b",
|
|
1381
|
+
"\\bparam[\xE9e]trer(?: les)? cookies\\b|\\bparam[\xE8e]tres(?: des)? cookies\\b|\\bg[\xE9e]rer(?: les)? cookies\\b|\\bpersonnaliser(?: les)? cookies\\b",
|
|
1382
|
+
"\\bgestisci(?: i)? cookie|\\bimpostazioni(?: dei| sui)? cookie|\\bpersonalizza(?: i)? cookie",
|
|
1383
|
+
"\\bcookie-?instellingen\\b|\\bcookies? beheren\\b|\\bvoorkeuren (?:beheren|aanpassen)\\b",
|
|
1384
|
+
"^\\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*$",
|
|
1385
|
+
"^\\s*close (?:this|the) (?:popup|banner|notice|message)\\s*$"
|
|
1386
|
+
].join("|"),
|
|
1387
|
+
"im"
|
|
1388
|
+
);
|
|
1389
|
+
var ageGateUnless = (control) => (text) => !LEAVE_LINE.test(text) && (control.test(text) || NOTICE_OWN_CONTROL.test(text));
|
|
1390
|
+
var CONSENT_WORDS = /cookie|consent|track|partner|personali[sz]|advertis|analytic|privacy (?:options|choices|settings|rights)|do not sell|opt[- ]out/i;
|
|
1391
|
+
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;
|
|
1392
|
+
var DETECT_CONTEXT_NEGATIVES = [
|
|
1393
|
+
// popups with their own age confirmation are age gates, even when they mention cookies; a bare accept doesn't count
|
|
1394
|
+
// as a cookie choice here, since it may confirm the age
|
|
1395
|
+
{ name: "age-gate-popup", pattern: AGE_WORDING, unless: ageGateUnless(COOKIE_CHOICE_RE), whole: true, input: "popup" },
|
|
1396
|
+
// a license or terms agreement may mention cookies, and its decline button must not be clicked as a cookie reject
|
|
1397
|
+
{ name: "legal-agreement", pattern: LEGAL_AGREEMENT, whole: true, input: "popup" },
|
|
1398
|
+
// page text next to an age gate, unless a consent control is there too
|
|
1399
|
+
{ name: "age-gate", pattern: AGE_WORDING, unless: ageGateUnless(NOTICE_CONTROL), lines: [4, 5], input: "page" },
|
|
1400
|
+
// terms of use need cookie or consent wording; a privacy-policy-only notice needs that or a button
|
|
1401
|
+
{
|
|
1402
|
+
name: "terms-without-consent",
|
|
1403
|
+
pattern: /\bterms\b|\bconditions\b/i,
|
|
1404
|
+
unless: CONSENT_WORDS,
|
|
1405
|
+
appliesTo: [BY_CONTINUING_PRIVACY]
|
|
1406
|
+
},
|
|
1407
|
+
{
|
|
1408
|
+
name: "privacy-without-control",
|
|
1409
|
+
unless: new RegExp(`${CONSENT_WORDS.source}|${DISMISS_LINE.source}`, "im"),
|
|
1410
|
+
appliesTo: [BY_CONTINUING_PRIVACY]
|
|
1411
|
+
},
|
|
1412
|
+
// a cookie policy link among short footer link lines
|
|
1413
|
+
{
|
|
1414
|
+
name: "footer-link",
|
|
1415
|
+
pattern: /^[^.!?:\n]{0,60}\n[\s]*\n?[^.!?:\s][^.!?:\n]{0,59}(?:\n|$)/,
|
|
1416
|
+
unless: NOTICE_CONTROL,
|
|
1417
|
+
lines: [0, 2],
|
|
1418
|
+
input: "page",
|
|
1419
|
+
appliesTo: [USE_OF_COOKIES, VERWENDUNG_VON_COOKIES, UTILISATION_DES_COOKIES, GEBRUIK_VAN_COOKIES]
|
|
1420
|
+
},
|
|
1421
|
+
// "accept all" in prose; case-sensitive since button labels run together in innerText
|
|
1422
|
+
{
|
|
1423
|
+
name: "accept-all-prose",
|
|
1424
|
+
pattern: /\baccept all [a-z]|\baccept All[a-z]/,
|
|
1425
|
+
unless: /accept all (?:cookies|and|&)/i,
|
|
1426
|
+
window: 15,
|
|
1427
|
+
appliesTo: [ACCEPT_ALL]
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
name: "acceptez-terms",
|
|
1431
|
+
pattern: /conditions (?:générales )?d.utilisation|\bcgu\b/i,
|
|
1432
|
+
unless: /cookie|témoin|traceur|partenaire/i,
|
|
1433
|
+
appliesTo: [ACCEPTEZ_UTILISATION]
|
|
1434
|
+
},
|
|
1435
|
+
// the same sentence is also a footer line with only a "learn more" link
|
|
1436
|
+
{ name: "de-cookie-verb-needs-control", unless: NOTICE_CONTROL, lines: [1, 6], input: "page", appliesTo: [DE_COOKIE_VERB] }
|
|
1437
|
+
];
|
|
1438
|
+
|
|
1439
|
+
// lib/heuristic-literals.ts
|
|
1440
|
+
var DETECT_PATTERN_LITERALS = [
|
|
1441
|
+
["accept cookies"],
|
|
1442
|
+
["accept all"],
|
|
1443
|
+
["reject all"],
|
|
1444
|
+
["only necessary cookies"],
|
|
1445
|
+
[],
|
|
1446
|
+
[],
|
|
1447
|
+
[" cookies"],
|
|
1448
|
+
["we are using cookies"],
|
|
1449
|
+
["use of cookies"],
|
|
1450
|
+
["website uses cookies to enhance your browsing experience"],
|
|
1451
|
+
["cookies"],
|
|
1452
|
+
[" technologies"],
|
|
1453
|
+
["such as cookies"],
|
|
1454
|
+
["read more about"],
|
|
1455
|
+
["consent to"],
|
|
1456
|
+
["we and our partners"],
|
|
1457
|
+
["information"],
|
|
1458
|
+
["store and/or access information"],
|
|
1459
|
+
["personalised ads and content, ad and content measurement"],
|
|
1460
|
+
[" and/or access"],
|
|
1461
|
+
["and our partners ask for your consent"],
|
|
1462
|
+
["we and "],
|
|
1463
|
+
["partners", "partnern", "partner", "partenaires", "socios", "vendors", "fornitori"],
|
|
1464
|
+
["partner"],
|
|
1465
|
+
["technolog"],
|
|
1466
|
+
["cookies"],
|
|
1467
|
+
["cookies"],
|
|
1468
|
+
["optional", "additional", "non-essential"],
|
|
1469
|
+
["storing of cookies", "placed cookies"],
|
|
1470
|
+
[" on your device", "access and store "],
|
|
1471
|
+
["we use "],
|
|
1472
|
+
["out of "],
|
|
1473
|
+
["out of the sale"],
|
|
1474
|
+
["this website or its third"],
|
|
1475
|
+
["information"],
|
|
1476
|
+
["rights with regard to the sale"],
|
|
1477
|
+
["we use technologies "],
|
|
1478
|
+
["continue reading with advertising", " tracking"],
|
|
1479
|
+
["consent and continue"],
|
|
1480
|
+
["store or retrieve information on your browser", "stock\xE9es dans votre navigateur ou r\xE9cup\xE9r\xE9es"],
|
|
1481
|
+
["utilisons"],
|
|
1482
|
+
["cookies"],
|
|
1483
|
+
["consentement"],
|
|
1484
|
+
["partenaires"],
|
|
1485
|
+
["publicit\xE9s"],
|
|
1486
|
+
["utilise"],
|
|
1487
|
+
["utilisent"],
|
|
1488
|
+
["stocker"],
|
|
1489
|
+
["consentement"],
|
|
1490
|
+
["consentement"],
|
|
1491
|
+
["accepter"],
|
|
1492
|
+
["utilisation"],
|
|
1493
|
+
["technologies"],
|
|
1494
|
+
["utilisation"],
|
|
1495
|
+
["continuer sans accepter"],
|
|
1496
|
+
["tout refuser"],
|
|
1497
|
+
[" tous les cookies"],
|
|
1498
|
+
["je refuse"],
|
|
1499
|
+
["refuser et continuer"],
|
|
1500
|
+
["refuser les cookies"],
|
|
1501
|
+
["seulement n\xE9cessaires"],
|
|
1502
|
+
["je d\xE9sactive les finalit\xE9s non essentielles"],
|
|
1503
|
+
["cookies essentiels uniquement"],
|
|
1504
|
+
["n\xE9cessaires uniquement"],
|
|
1505
|
+
["stocker", "stockons"],
|
|
1506
|
+
["nos partenaires demandent votre consentement"],
|
|
1507
|
+
["consentez \xE0 l", " cookies"],
|
|
1508
|
+
["les cookies nous permettent", "nos partenaires et nous"],
|
|
1509
|
+
["accepter "],
|
|
1510
|
+
["verwenden"],
|
|
1511
|
+
["partner"],
|
|
1512
|
+
["zugriff auf informationen auf"],
|
|
1513
|
+
["werbeleistung"],
|
|
1514
|
+
["cookies"],
|
|
1515
|
+
["verwendung"],
|
|
1516
|
+
["cookies"],
|
|
1517
|
+
["verwendet"],
|
|
1518
|
+
["auswahl"],
|
|
1519
|
+
["technologien"],
|
|
1520
|
+
["verwenden"],
|
|
1521
|
+
["ablehnen"],
|
|
1522
|
+
["zus\xE4tzliche", "essenzielle", "funktionale", "notwendige", "erforderliche"],
|
|
1523
|
+
["einwilligung", "zustimmung", "cookies"],
|
|
1524
|
+
["ablehnen"],
|
|
1525
|
+
["nur funktionale cookies akzeptieren"],
|
|
1526
|
+
["optionale ablehnen"],
|
|
1527
|
+
["zustimmung verweigern"],
|
|
1528
|
+
["speichern und/oder "],
|
|
1529
|
+
["unsere partner bitten um ihre zustimmung"],
|
|
1530
|
+
[" cookies"],
|
|
1531
|
+
["cookies "],
|
|
1532
|
+
[" zum einsatz", "einsatz von cookies"],
|
|
1533
|
+
["einverstanden", "einverstanden"],
|
|
1534
|
+
["akzeptieren", "zulassen", "erlauben", "zustimmen"],
|
|
1535
|
+
["zustimmen und weiter", " ohne zu "],
|
|
1536
|
+
["einwilligung", "zustimmung", "zustimmung", "einwilligung"],
|
|
1537
|
+
["tracking-technologien"],
|
|
1538
|
+
["verwendung "],
|
|
1539
|
+
["mit werbetracking weiterlesen", "weiter mit werbung", "con tracking e annunci"],
|
|
1540
|
+
["gebruik"],
|
|
1541
|
+
["gebruiken"],
|
|
1542
|
+
["vergelijkbare"],
|
|
1543
|
+
["afwijzen", "weigeren", "verwerpen"],
|
|
1544
|
+
["noodzakelijk"],
|
|
1545
|
+
["cookies weigeren"],
|
|
1546
|
+
["weiger"],
|
|
1547
|
+
["doorgaan zonder "],
|
|
1548
|
+
["optionele", "functionele", "functioneel", "noodzakelijke", "essenti\xEBle"],
|
|
1549
|
+
["wijs alles af"],
|
|
1550
|
+
[],
|
|
1551
|
+
["onze partners vragen om "],
|
|
1552
|
+
["wij en onze "],
|
|
1553
|
+
[" cookies"],
|
|
1554
|
+
["accepteer "],
|
|
1555
|
+
["analytische", "functionele", "essenti\xEBle", "noodzakelijke"],
|
|
1556
|
+
[" contin"],
|
|
1557
|
+
["cookie"],
|
|
1558
|
+
[" uso de cookies"],
|
|
1559
|
+
["usa cookies de google"],
|
|
1560
|
+
[" uso de cookies"],
|
|
1561
|
+
["al utilizar nuestro sitio web"],
|
|
1562
|
+
["almacenar la informaci\xF3n en un dispositivo y"],
|
|
1563
|
+
[" utiliza"],
|
|
1564
|
+
["cookies propias y de"],
|
|
1565
|
+
["son necesarias"],
|
|
1566
|
+
[" cookie"],
|
|
1567
|
+
["navegando"],
|
|
1568
|
+
["nosotros y nuestros"],
|
|
1569
|
+
["recopilamos y almacenamos datos de usted y de su dispositivo"],
|
|
1570
|
+
["utilizamos tecnolog"],
|
|
1571
|
+
["almacenar", "almacenamos"],
|
|
1572
|
+
["nuestros socios solicitan su consentimiento"],
|
|
1573
|
+
["tanto nosotros como", "nosotros y"],
|
|
1574
|
+
["aceptar", "rechazar", "continuar sin aceptar", "solo las necesarias"],
|
|
1575
|
+
["uso de "],
|
|
1576
|
+
["cookies "],
|
|
1577
|
+
["las cookies nos "],
|
|
1578
|
+
["instalamos", "empleamos"],
|
|
1579
|
+
["cookies", "necesitamos usar cookies"],
|
|
1580
|
+
[" cookie"],
|
|
1581
|
+
["u\u017Cywa\u0107", "u\u017Cywamy"],
|
|
1582
|
+
["cele przetwarzania twoich danych przez zaufanych partner\xF3w iab"],
|
|
1583
|
+
["dzi\u0119ki "],
|
|
1584
|
+
[" plik\xF3w cookie"],
|
|
1585
|
+
["korzystamy z technologii, takich jak pliki cookie"],
|
|
1586
|
+
["korzystamy"],
|
|
1587
|
+
["niekt\xF3re pliki cookies"],
|
|
1588
|
+
["pliki cookies i pokrewne im technologie umo\u017Cliwiaj\u0105 poprawne dzia\u0142anie strony i pomagaj\u0105 nam dostosowa\u0107 ofert\u0119 do twoich potrzeb"],
|
|
1589
|
+
["przechowywanie informacji na urz\u0105dzeniu lub dost\u0119p do nich"],
|
|
1590
|
+
["przechowywanie plik\xF3w cookie na swoim urz\u0105dzeniu"],
|
|
1591
|
+
["przechowywa\u0107 i uzyskiwa\u0107 dost\u0119p do informacji na twoich urz\u0105dzeniach"],
|
|
1592
|
+
["przetwarzamy"],
|
|
1593
|
+
[" u\u017Cywa "],
|
|
1594
|
+
["ta strona korzysta z ciasteczek"],
|
|
1595
|
+
["uzyskujemy dost\u0119p i przechowujemy informacje na urz\u0105dzeniu"],
|
|
1596
|
+
["u\u017Cywa plik"],
|
|
1597
|
+
["u\u017Cywamy plik\xF3w"],
|
|
1598
|
+
["wykorzystuj\u0105 "],
|
|
1599
|
+
["za pomoc\u0105 plik\xF3w cookies"],
|
|
1600
|
+
["zgod\u0105 my i nasi partnerzy mo\u017Cemy wykorzystywa\u0107 precyzyjne dane geolokalizacyjne i identyfikacj\u0119"],
|
|
1601
|
+
["cookies pr\xF2pies i de tercers"],
|
|
1602
|
+
["utilitzem galetes"],
|
|
1603
|
+
["\xFAnicament utilitza galetes pr\xF2pies amb finalitat t\xE8cnica"],
|
|
1604
|
+
["este lloc web utilitza nom\xE9s cookies t\xE8cniques necess\xE0ries per al seu funcionament"],
|
|
1605
|
+
["de personalitzaci\xF3 i an\xE0lisi"],
|
|
1606
|
+
["utilitzem cookies i altres tecnologies"],
|
|
1607
|
+
["cookies", "galetes"],
|
|
1608
|
+
["cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu"],
|
|
1609
|
+
["cookie propioak eta hirugarrenen cookieak erabiltzen ditugu"],
|
|
1610
|
+
["cookie propioak eta hirugarrenenak helburu teknikoarekin erabiltzen ditu"],
|
|
1611
|
+
["ak erabiltzen ditu"],
|
|
1612
|
+
["cookieak erabiltzen ditu"],
|
|
1613
|
+
[" bazkideek cookieak eta identifikadoreak erabiltzen ditugu"],
|
|
1614
|
+
["norberaren eta hirugarrenen cookie"],
|
|
1615
|
+
["web orri honek cookieak erabiltzen ditu"],
|
|
1616
|
+
["webgune honek cookie propioak eta hirugarrenen cookie-fitxategiak erabiltzen ditu"],
|
|
1617
|
+
["empregamos cookies propias"],
|
|
1618
|
+
["este portal emprega cookies propias ou de terceiros con fins anal\xEDticos"],
|
|
1619
|
+
["\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443"],
|
|
1620
|
+
["\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443"],
|
|
1621
|
+
["cookie", "\u043A\u0443\u043A\u0438"],
|
|
1622
|
+
["\u0442\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0438"],
|
|
1623
|
+
["cookie", "\u043A\u0443\u043A\u0438"],
|
|
1624
|
+
[],
|
|
1625
|
+
["usiamo", "utilizziamo"],
|
|
1626
|
+
["cookie"],
|
|
1627
|
+
["noi e i nostri"],
|
|
1628
|
+
[" cookie"],
|
|
1629
|
+
[" cookie"],
|
|
1630
|
+
["tecnici", "di profilazione", "di terze parti", "analitici", "statistici", "di marketing"],
|
|
1631
|
+
["acconsent", "accett"],
|
|
1632
|
+
[" navigazione"],
|
|
1633
|
+
["accetta", "accetto", "accettare", "rifiuta", "rifiuto", "rifiutare"],
|
|
1634
|
+
[" senza accettare"],
|
|
1635
|
+
["rifiuta e abbonati"],
|
|
1636
|
+
["consenso "],
|
|
1637
|
+
[" nostri "],
|
|
1638
|
+
["terze parti selezionate"],
|
|
1639
|
+
["archiviare", "archiviamo", "memorizzare", "memorizziamo"],
|
|
1640
|
+
["anv\xE4nder"],
|
|
1641
|
+
["cookie", "\u30AF\u30C3\u30AD\u30FC"],
|
|
1642
|
+
["bruger cookies"],
|
|
1643
|
+
["informasjonskapsler", "cookies"]
|
|
1644
|
+
];
|
|
1645
|
+
|
|
1646
|
+
// lib/heuristic-prefilter.ts
|
|
1647
|
+
function literalIndex(all) {
|
|
1648
|
+
const distinct = [...new Set(all)].sort((a, b) => b.length - a.length);
|
|
1649
|
+
if (distinct.length === 0) {
|
|
1650
|
+
return { present: () => /* @__PURE__ */ new Set() };
|
|
1651
|
+
}
|
|
1652
|
+
const escape = (l) => l.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
1653
|
+
const any = new RegExp(`(?=(${distinct.map(escape).join("|")}))`, "g");
|
|
1654
|
+
const implies = /* @__PURE__ */ new Map();
|
|
1655
|
+
const impliedBy = (m) => {
|
|
1656
|
+
let list = implies.get(m);
|
|
1657
|
+
if (!list) {
|
|
1658
|
+
list = distinct.filter((l) => m.startsWith(l));
|
|
1659
|
+
implies.set(m, list);
|
|
1660
|
+
}
|
|
1661
|
+
return list;
|
|
1662
|
+
};
|
|
1663
|
+
return {
|
|
1664
|
+
present(lower) {
|
|
1665
|
+
const found = /* @__PURE__ */ new Set();
|
|
1666
|
+
for (const m of lower.matchAll(any)) {
|
|
1667
|
+
if (!found.has(m[1])) {
|
|
1668
|
+
impliedBy(m[1]).forEach((l) => found.add(l));
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
return found;
|
|
1672
|
+
}
|
|
1673
|
+
};
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
// lib/heuristic-detect.ts
|
|
1253
1677
|
var TEXT_LIMIT = 1e5;
|
|
1254
|
-
|
|
1255
|
-
|
|
1678
|
+
var DEFAULT_WINDOW = 150;
|
|
1679
|
+
var builtinLiterals;
|
|
1680
|
+
function literalsOf(pattern) {
|
|
1681
|
+
if (!builtinLiterals) {
|
|
1682
|
+
const fresh = DETECT_PATTERN_LITERALS.length === DETECT_PATTERNS.length;
|
|
1683
|
+
builtinLiterals = new Map(fresh ? DETECT_PATTERNS.map((p, i) => [patternOf(p), DETECT_PATTERN_LITERALS[i]]) : []);
|
|
1684
|
+
}
|
|
1685
|
+
return builtinLiterals.get(pattern) ?? [];
|
|
1686
|
+
}
|
|
1687
|
+
var index;
|
|
1688
|
+
var literalsIn = (lower) => (index ??= literalIndex(DETECT_PATTERN_LITERALS.flat())).present(lower);
|
|
1689
|
+
var truncate = (text) => (text || "").slice(0, TEXT_LIMIT);
|
|
1690
|
+
var forInput = (scoped, input) => !scoped.input || scoped.input === input;
|
|
1691
|
+
var stateless = (re) => new RegExp(re.source, re.flags.replace(/[gy]/g, ""));
|
|
1692
|
+
function toPredicate(test) {
|
|
1693
|
+
if (typeof test === "function") {
|
|
1694
|
+
return test;
|
|
1695
|
+
}
|
|
1696
|
+
const re = stateless(test);
|
|
1697
|
+
return (text) => re.test(text);
|
|
1698
|
+
}
|
|
1699
|
+
var compiledPatterns = /* @__PURE__ */ new WeakMap();
|
|
1700
|
+
var compiledNegatives = /* @__PURE__ */ new WeakMap();
|
|
1701
|
+
function compilePatterns(detectPatterns) {
|
|
1702
|
+
let compiled = compiledPatterns.get(detectPatterns);
|
|
1703
|
+
if (!compiled) {
|
|
1704
|
+
compiled = detectPatterns.map((p) => {
|
|
1705
|
+
const pattern = patternOf(p);
|
|
1706
|
+
const input = p instanceof RegExp ? void 0 : p.input;
|
|
1707
|
+
const global = pattern.flags.includes("g") ? pattern : new RegExp(pattern.source, `${pattern.flags}g`);
|
|
1708
|
+
return { id: pattern.toString(), pattern, global, input, literals: literalsOf(pattern) };
|
|
1709
|
+
});
|
|
1710
|
+
compiledPatterns.set(detectPatterns, compiled);
|
|
1711
|
+
}
|
|
1712
|
+
return compiled;
|
|
1713
|
+
}
|
|
1714
|
+
function compileNegatives(negatives) {
|
|
1715
|
+
let compiled = compiledNegatives.get(negatives);
|
|
1716
|
+
if (!compiled) {
|
|
1717
|
+
compiled = negatives.map((n) => {
|
|
1718
|
+
const pattern = n.pattern ? stateless(n.pattern) : null;
|
|
1719
|
+
const unless = n.unless ? toPredicate(n.unless) : null;
|
|
1720
|
+
return {
|
|
1721
|
+
...n,
|
|
1722
|
+
hits: (context) => (!pattern || pattern.test(context)) && !(unless && unless(context)),
|
|
1723
|
+
applies: n.appliesTo ? new Set(n.appliesTo.map(String)) : null
|
|
1724
|
+
};
|
|
1725
|
+
});
|
|
1726
|
+
compiledNegatives.set(negatives, compiled);
|
|
1727
|
+
}
|
|
1728
|
+
return compiled;
|
|
1729
|
+
}
|
|
1730
|
+
function negativeContext(text, start, end, negative) {
|
|
1731
|
+
if (negative.whole) {
|
|
1732
|
+
return text;
|
|
1733
|
+
}
|
|
1734
|
+
if (negative.lines === void 0) {
|
|
1735
|
+
const w = negative.window ?? DEFAULT_WINDOW;
|
|
1736
|
+
return text.slice(Math.max(0, start - w), end + w);
|
|
1737
|
+
}
|
|
1738
|
+
const lineEnd = (i) => {
|
|
1739
|
+
const next = text.indexOf("\n", i);
|
|
1740
|
+
return next === -1 ? text.length : next;
|
|
1741
|
+
};
|
|
1742
|
+
const [before, after] = Array.isArray(negative.lines) ? negative.lines : [negative.lines, negative.lines];
|
|
1743
|
+
let from = start > 0 ? text.lastIndexOf("\n", start - 1) + 1 : 0;
|
|
1744
|
+
let to = lineEnd(end);
|
|
1745
|
+
for (let i = 0; i < before; i++) {
|
|
1746
|
+
from = from >= 2 ? text.lastIndexOf("\n", from - 2) + 1 : 0;
|
|
1747
|
+
}
|
|
1748
|
+
for (let i = 0; i < after; i++) {
|
|
1749
|
+
to = to < text.length ? lineEnd(to + 1) : to;
|
|
1750
|
+
}
|
|
1751
|
+
return text.slice(from, to);
|
|
1752
|
+
}
|
|
1753
|
+
function checkHeuristicPatterns(allText, input, options = {}) {
|
|
1754
|
+
return matchHeuristicPatterns(allText, input, options, false);
|
|
1755
|
+
}
|
|
1756
|
+
function hasHeuristicPatterns(allText, input, options = {}) {
|
|
1757
|
+
return matchHeuristicPatterns(allText, input, options, true).patterns.length > 0;
|
|
1758
|
+
}
|
|
1759
|
+
function matchHeuristicPatterns(allText, input, { patterns: detectPatterns = DETECT_PATTERNS, negatives = DETECT_CONTEXT_NEGATIVES }, firstOnly) {
|
|
1760
|
+
if (input !== void 0 && input !== "popup" && input !== "page") {
|
|
1761
|
+
const got = Array.isArray(input) ? "a pattern list (pass it as the `patterns` option)" : JSON.stringify(input);
|
|
1762
|
+
throw new TypeError(`heuristic input must be 'popup', 'page' or undefined, got ${got}`);
|
|
1763
|
+
}
|
|
1764
|
+
allText = truncate(allText);
|
|
1256
1765
|
const patterns = [];
|
|
1257
1766
|
const snippets2 = [];
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1767
|
+
const suppressed = [];
|
|
1768
|
+
const applicable = compileNegatives(negatives).filter((n) => forInput(n, input));
|
|
1769
|
+
let present;
|
|
1770
|
+
const wholeHits = /* @__PURE__ */ new Map();
|
|
1771
|
+
const hitsAt = (n, start, end) => {
|
|
1772
|
+
if (!n.whole) {
|
|
1773
|
+
return n.hits(negativeContext(allText, start, end, n));
|
|
1774
|
+
}
|
|
1775
|
+
let hit = wholeHits.get(n);
|
|
1776
|
+
if (hit === void 0) {
|
|
1777
|
+
hit = n.hits(allText);
|
|
1778
|
+
wholeHits.set(n, hit);
|
|
1779
|
+
}
|
|
1780
|
+
return hit;
|
|
1781
|
+
};
|
|
1782
|
+
for (const d of compilePatterns(detectPatterns)) {
|
|
1783
|
+
if (!forInput(d, input)) {
|
|
1784
|
+
continue;
|
|
1785
|
+
}
|
|
1786
|
+
if (d.literals.length) {
|
|
1787
|
+
const inText = present ??= literalsIn(allText.toLowerCase());
|
|
1788
|
+
if (!d.literals.some((l) => inText.has(l))) {
|
|
1789
|
+
continue;
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
const own = applicable.filter((n) => !n.applies || n.applies.has(d.id));
|
|
1793
|
+
const matched = [];
|
|
1794
|
+
const dropped = /* @__PURE__ */ new Set();
|
|
1795
|
+
let found = false;
|
|
1796
|
+
let kept = own.length === 0;
|
|
1797
|
+
for (const m of allText.matchAll(d.global)) {
|
|
1798
|
+
found = true;
|
|
1799
|
+
if (!kept) {
|
|
1800
|
+
const start = m.index ?? 0;
|
|
1801
|
+
const hit = own.find((n) => hitsAt(n, start, start + m[0].length));
|
|
1802
|
+
if (hit) {
|
|
1803
|
+
dropped.add(hit.name);
|
|
1804
|
+
} else {
|
|
1805
|
+
kept = true;
|
|
1265
1806
|
}
|
|
1266
1807
|
}
|
|
1808
|
+
if (kept && firstOnly) {
|
|
1809
|
+
break;
|
|
1810
|
+
}
|
|
1811
|
+
matched.push(m[0].substring(0, 200));
|
|
1267
1812
|
}
|
|
1813
|
+
if (!found) {
|
|
1814
|
+
continue;
|
|
1815
|
+
}
|
|
1816
|
+
if (!kept) {
|
|
1817
|
+
dropped.forEach((negative) => suppressed.push({ pattern: d.id, negative }));
|
|
1818
|
+
continue;
|
|
1819
|
+
}
|
|
1820
|
+
patterns.push(d.id);
|
|
1821
|
+
if (firstOnly) {
|
|
1822
|
+
break;
|
|
1823
|
+
}
|
|
1824
|
+
snippets2.push(...matched);
|
|
1268
1825
|
}
|
|
1269
|
-
return { patterns, snippets: snippets2 };
|
|
1270
|
-
}
|
|
1271
|
-
function hasHeuristicPatterns(allText, detectPatterns = DETECT_PATTERNS) {
|
|
1272
|
-
const text = allText.slice(0, TEXT_LIMIT);
|
|
1273
|
-
return detectPatterns.some((p) => text.search(p) !== -1);
|
|
1826
|
+
return { patterns, snippets: snippets2, suppressed };
|
|
1274
1827
|
}
|
|
1828
|
+
|
|
1829
|
+
// lib/heuristic-classify.ts
|
|
1275
1830
|
function classifyButtons(buttons) {
|
|
1276
1831
|
for (const button of buttons) {
|
|
1277
1832
|
button.regexClassification = classifyButtonTextRegex(button.text);
|
|
1278
1833
|
}
|
|
1279
1834
|
}
|
|
1280
|
-
function isExcludedPopup(popupText, excludePatterns = DETECT_NEVER_MATCH_PATTERNS) {
|
|
1281
|
-
if (!popupText) {
|
|
1282
|
-
return false;
|
|
1283
|
-
}
|
|
1284
|
-
const truncated = popupText.slice(0, TEXT_LIMIT);
|
|
1285
|
-
return excludePatterns.some((p) => p.test(truncated));
|
|
1286
|
-
}
|
|
1287
1835
|
function classifyPopup(buttons) {
|
|
1288
1836
|
const { reject, settings, accept, acknowledge } = buttons.reduce(
|
|
1289
1837
|
(acc, button) => {
|
|
@@ -1346,6 +1894,8 @@
|
|
|
1346
1894
|
// lib/heuristics.ts
|
|
1347
1895
|
var BUTTON_LIKE_ELEMENT_SELECTOR = 'button, input[type="button"], input[type="submit"], a, [role="button"], [class*="button"]';
|
|
1348
1896
|
var POPUP_SEARCH_MAX_TIME = 100;
|
|
1897
|
+
var FRAGMENT_NEGATIVES = DETECT_CONTEXT_NEGATIVES.filter((n) => !n.whole);
|
|
1898
|
+
var hasFragmentPatterns = (text) => hasHeuristicPatterns(text, "popup", { negatives: FRAGMENT_NEGATIVES });
|
|
1349
1899
|
var ACCEPTED_LEVELS = {
|
|
1350
1900
|
off: [],
|
|
1351
1901
|
reject: ["reject"],
|
|
@@ -1381,7 +1931,7 @@
|
|
|
1381
1931
|
let result = consentPopups.get(popup);
|
|
1382
1932
|
if (result === void 0) {
|
|
1383
1933
|
const popupText = popup.text.trim();
|
|
1384
|
-
result = !!popupText &&
|
|
1934
|
+
result = !!popupText && hasHeuristicPatterns(popupText, "popup");
|
|
1385
1935
|
consentPopups.set(popup, result);
|
|
1386
1936
|
}
|
|
1387
1937
|
return result;
|
|
@@ -1518,7 +2068,7 @@
|
|
|
1518
2068
|
}
|
|
1519
2069
|
function toPopupRoot(el, shadowHosts) {
|
|
1520
2070
|
const text = getElementText(el);
|
|
1521
|
-
if (!text || !
|
|
2071
|
+
if (!text || !hasFragmentPatterns(text)) {
|
|
1522
2072
|
return null;
|
|
1523
2073
|
}
|
|
1524
2074
|
const popup = toPopupData(el, shadowHosts, text);
|
|
@@ -1539,7 +2089,7 @@
|
|
|
1539
2089
|
return null;
|
|
1540
2090
|
}
|
|
1541
2091
|
function expandPopupFragment(popup, shadowHosts) {
|
|
1542
|
-
if (
|
|
2092
|
+
if (hasFragmentPatterns(popup.text) && hasPopupButtons(popup.text, popup.buttons)) {
|
|
1543
2093
|
return popup;
|
|
1544
2094
|
}
|
|
1545
2095
|
const parent = getComposedParent(popup.element);
|
|
@@ -2464,13 +3014,13 @@
|
|
|
2464
3014
|
return false;
|
|
2465
3015
|
}
|
|
2466
3016
|
async detectCmp() {
|
|
2467
|
-
return this.elementExists("#_evidon_banner");
|
|
3017
|
+
return this.elementExists("#_evidon_banner, #_evidon-barrier-wrapper");
|
|
2468
3018
|
}
|
|
2469
3019
|
async detectPopup() {
|
|
2470
|
-
return this.elementVisible("#_evidon_banner", "any");
|
|
3020
|
+
return this.elementVisible("#_evidon_banner, #_evidon-barrier-wrapper #_evidon-banner", "any");
|
|
2471
3021
|
}
|
|
2472
3022
|
async optOut() {
|
|
2473
|
-
if (await this.click("#_evidon-decline-button")) {
|
|
3023
|
+
if (await this.click("#_evidon-decline-button, #_evidon-barrier-declinebutton, #_evidon_banner #RejectLink")) {
|
|
2474
3024
|
return true;
|
|
2475
3025
|
}
|
|
2476
3026
|
hideElements(getStyleElement(), "#evidon-prefdiag-overlay,#evidon-prefdiag-background,#_evidon-background");
|
|
@@ -2481,7 +3031,7 @@
|
|
|
2481
3031
|
return true;
|
|
2482
3032
|
}
|
|
2483
3033
|
async optIn() {
|
|
2484
|
-
return await this.click("#_evidon-accept-button");
|
|
3034
|
+
return await this.click("#_evidon-accept-button, #_evidon-banner-acceptbutton");
|
|
2485
3035
|
}
|
|
2486
3036
|
};
|
|
2487
3037
|
|
|
@@ -2748,9 +3298,6 @@
|
|
|
2748
3298
|
constructor() {
|
|
2749
3299
|
super(...arguments);
|
|
2750
3300
|
this.name = "tiktok.com";
|
|
2751
|
-
this.runContext = {
|
|
2752
|
-
urlPattern: "tiktok"
|
|
2753
|
-
};
|
|
2754
3301
|
}
|
|
2755
3302
|
get hasSelfTest() {
|
|
2756
3303
|
return true;
|
|
@@ -3476,7 +4023,7 @@
|
|
|
3476
4023
|
detectHeuristics() {
|
|
3477
4024
|
if (this.config.enableHeuristicDetection) {
|
|
3478
4025
|
this.config.performanceLoggingEnabled && performance.mark("detectHeuristicsStart");
|
|
3479
|
-
const { patterns, snippets: snippets2 } = checkHeuristicPatterns(document.documentElement?.innerText || "");
|
|
4026
|
+
const { patterns, snippets: snippets2 } = checkHeuristicPatterns(document.documentElement?.innerText || "", "page");
|
|
3480
4027
|
if (patterns.length > 0 && (patterns.length !== this.state.heuristicPatterns.length || this.state.heuristicPatterns.some((p, i) => p !== patterns[i]))) {
|
|
3481
4028
|
this.config.logs.lifecycle && console.log("Heuristic patterns found", patterns, snippets2);
|
|
3482
4029
|
this.updateState({ heuristicPatterns: patterns, heuristicSnippets: snippets2 });
|