@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.
Files changed (102) hide show
  1. package/.github/workflows/ddg-release.yml +6 -3
  2. package/.prettierignore +1 -0
  3. package/AGENTS.md +2 -0
  4. package/CHANGELOG.md +57 -0
  5. package/dist/addon-firefox/background.bundle.js +4 -1
  6. package/dist/addon-firefox/compact-rules.json +1 -1
  7. package/dist/addon-firefox/content.bundle.js +608 -61
  8. package/dist/addon-firefox/manifest.json +1 -1
  9. package/dist/addon-firefox/rule-index.json +1 -1
  10. package/dist/addon-firefox/rules.json +1 -1
  11. package/dist/addon-mv3/background.bundle.js +4 -1
  12. package/dist/addon-mv3/compact-rules.json +1 -1
  13. package/dist/addon-mv3/content.bundle.js +608 -61
  14. package/dist/addon-mv3/manifest.json +1 -1
  15. package/dist/addon-mv3/rule-index.json +1 -1
  16. package/dist/addon-mv3/rules.json +1 -1
  17. package/dist/autoconsent.cjs.js +614 -67
  18. package/dist/autoconsent.esm.js +614 -67
  19. package/dist/autoconsent.playwright.js +608 -61
  20. package/dist/autoconsent.standalone.js +615 -68
  21. package/dist/heuristics.cjs.js +621 -52
  22. package/dist/heuristics.mjs +609 -50
  23. package/dist/types/cmps/tiktok.d.ts +0 -2
  24. package/dist/types/eval-snippets.d.ts +2 -0
  25. package/dist/types/heuristic-classify.d.ts +2 -6
  26. package/dist/types/heuristic-detect.d.ts +32 -0
  27. package/dist/types/heuristic-literals.d.ts +1 -0
  28. package/dist/types/heuristic-negatives.d.ts +25 -0
  29. package/dist/types/heuristic-patterns.d.ts +18 -2
  30. package/dist/types/heuristic-prefilter.d.ts +13 -0
  31. package/docs/heuristic-detection.md +78 -0
  32. package/docs/heuristic-prefilter.md +62 -0
  33. package/eslint.config.mjs +16 -1
  34. package/lib/cmps/evidon.ts +5 -4
  35. package/lib/cmps/tiktok.ts +0 -5
  36. package/lib/eval-snippets.ts +3 -0
  37. package/lib/heuristic-classify.ts +4 -39
  38. package/lib/heuristic-detect.ts +209 -0
  39. package/lib/heuristic-literals.ts +207 -0
  40. package/lib/heuristic-negatives.ts +173 -0
  41. package/lib/heuristic-patterns.ts +104 -31
  42. package/lib/heuristic-prefilter.ts +40 -0
  43. package/lib/heuristics.ts +8 -4
  44. package/lib/web.ts +1 -1
  45. package/package.json +2 -1
  46. package/rules/autoconsent/binogi.json +32 -0
  47. package/rules/autoconsent/bokio.json +32 -0
  48. package/rules/autoconsent/botble-cookie-consent.json +16 -0
  49. package/rules/autoconsent/calcolo-tools.json +23 -0
  50. package/rules/autoconsent/consilium-europa-eu.json +35 -0
  51. package/rules/autoconsent/dtu-findit.json +47 -0
  52. package/rules/autoconsent/hikvision.com.json +18 -0
  53. package/rules/autoconsent/hmgroup-turbocookie.json +18 -0
  54. package/rules/autoconsent/hmrc-tracking-consent.json +40 -0
  55. package/rules/autoconsent/hurra-consent.json +16 -0
  56. package/rules/autoconsent/isidewith.com.json +38 -0
  57. package/rules/autoconsent/landgate.json +10 -0
  58. package/rules/autoconsent/meta-cookie-dialog-v2.json +40 -0
  59. package/rules/autoconsent/pakamera.json +19 -0
  60. package/rules/autoconsent/purecookie-cosmetic.json +13 -0
  61. package/rules/autoconsent/random-org.json +41 -0
  62. package/rules/autoconsent/reverb-gdpr-nag.json +18 -0
  63. package/rules/autoconsent/reverb.json +24 -0
  64. package/rules/autoconsent/tallink.json +13 -0
  65. package/rules/autoconsent/tealium.json +4 -1
  66. package/rules/autoconsent/typo3-cookieconsent.json +9 -0
  67. package/rules/autoconsent/vinnies-org-au.json +29 -0
  68. package/rules/autoconsent/zoho.json +23 -0
  69. package/rules/compact-rules.json +1 -1
  70. package/rules/rule-index.json +1 -1
  71. package/rules/rules.json +1 -1
  72. package/scripts/build-heuristic-literals.ts +24 -0
  73. package/scripts/required-literals.ts +177 -0
  74. package/tests/binogi.spec.ts +3 -0
  75. package/tests/bokio.spec.ts +6 -0
  76. package/tests/botble-cookie-consent.spec.ts +11 -0
  77. package/tests/calcolo-tools.spec.ts +3 -0
  78. package/tests/consilium-europa-eu.spec.ts +3 -0
  79. package/tests/dtu-findit.spec.ts +3 -0
  80. package/tests/evidon.spec.ts +2 -1
  81. package/tests/hikvision.com.spec.ts +3 -0
  82. package/tests/hmgroup-turbocookie.spec.ts +7 -0
  83. package/tests/hmrc-tracking-consent.spec.ts +7 -0
  84. package/tests/hurra-consent.spec.ts +8 -0
  85. package/tests/isidewith.com.spec.ts +3 -0
  86. package/tests/landgate.spec.ts +3 -0
  87. package/tests/meta-cookie-dialog-v2.spec.ts +10 -0
  88. package/tests/pakamera.spec.ts +5 -0
  89. package/tests/purecookie-cosmetic.spec.ts +8 -0
  90. package/tests/random-org.spec.ts +3 -0
  91. package/tests/reverb.spec.ts +7 -0
  92. package/tests/tallink.spec.ts +3 -0
  93. package/tests/tiktok.spec.ts +2 -2
  94. package/tests/typo3-cookieconsent.spec.ts +10 -0
  95. package/tests/vinnies-org-au.spec.ts +3 -0
  96. package/tests/zoho.spec.ts +5 -0
  97. package/tests-wtr/heuristics/heuristics-utils.test.ts +222 -8
  98. package/tests-wtr/heuristics/regex-syntax.test.ts +81 -0
  99. package/rules/generated/auto_GB_capcut.com_0.json +0 -28
  100. package/rules/generated/auto_NL_bonprix.nl_ovi.json +0 -40
  101. package/tests/generated/auto_GB_capcut.com_0.spec.ts +0 -2
  102. package/tests/generated/auto_NL_bonprix.nl_ovi.spec.ts +0 -2
@@ -1,16 +1,33 @@
1
+ /** Which text a detect pattern or context negative applies to: a popup element's text, or a whole page's text. */
2
+ export type HeuristicInput = 'popup' | 'page';
3
+ /** A detect pattern, optionally limited to one input. */
4
+ export type DetectPattern = RegExp | { pattern: RegExp; input: HeuristicInput };
5
+ /** A detect pattern's regex. */
6
+ export const patternOf = (p: DetectPattern): RegExp => (p instanceof RegExp ? p : p.pattern);
7
+ // detect patterns that context negatives refer to
8
+ export const BY_CONTINUING_PRIVACY = /(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi;
9
+ export const ACCEPT_ALL = /accept all/gi;
10
+ export const USE_OF_COOKIES = /use of cookies/gi;
11
+ export const UTILISATION_DES_COOKIES = /utilisation.{0,100}des.{0,100}cookies/gi;
12
+ export const ACCEPTEZ_UTILISATION = /acceptez.{0,100}l.{0,100}utilisation/gi;
13
+ export const VERWENDUNG_VON_COOKIES = /verwendung.{0,100}von.{0,100}cookies/gi;
14
+ export const DE_COOKIE_VERB =
15
+ /\b(?:nutzen|nutzt|verwenden|verwendet|setzen|setzt|benutzen|benutzt|speichert|platzieren)\b(?: \S+){0,4} cookies\b/gi;
16
+ export const GEBRUIK_VAN_COOKIES = /gebruik.{0,100}van.{0,100}cookies/gi;
17
+
1
18
  // TODO: check for false positive detections per pattern
2
19
  // these patterns are matched against popup-like elements or full document text to detect unknown cookie popups
3
- export const DETECT_PATTERNS = [
20
+ export const DETECT_PATTERNS: DetectPattern[] = [
4
21
  /accept cookies/gi,
5
- /accept all/gi,
22
+ ACCEPT_ALL,
6
23
  /reject all/gi,
7
24
  /only necessary cookies/gi, // "only necessary" is probably too broad
8
25
  /(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
9
- /(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi,
26
+ BY_CONTINUING_PRIVACY,
10
27
  // up to two qualifiers are common: "optional", "essential", "analytics", "google analytics", "third party", ...
11
28
  /we (?:use|serve)(?: \w+){0,2} cookies/gi,
12
29
  /we are using cookies/gi,
13
- /use of cookies/gi,
30
+ USE_OF_COOKIES,
14
31
  /website uses cookies to enhance your browsing experience/gi,
15
32
  /(?:this|our) (?:web)?site.{0,100}cookies/gi,
16
33
  /cookies (?:and|or) .{0,100} technologies/gi,
@@ -21,6 +38,33 @@ export const DETECT_PATTERNS = [
21
38
  /we.{0,100}store.{0,100}information.{0,100}such as.{0,100}cookies/gi,
22
39
  /store and\/or access information.{0,100}on a device/gi,
23
40
  /personalised ads and content, ad and content measurement/gi,
41
+ // TCF wording: "store and/or access information", "and our partners ask for your consent", "we and our N partners"
42
+ /\b(?:store|stores|storing) and\/or access(?:ing)? information\b/gi,
43
+ /\band our partners ask for your consent\b/gi,
44
+ /\bwe and (?:our|up to) (?:\d+ )?(?:partners|vendors)\b/gi,
45
+ // a partner count, in each language: "our 186 partners", "unseren 107 Partnern", "nuestros 1064 socios"
46
+ /\b(?:our|unseren|onze|nos|nuestros|i nostri) \d{2,4} (?:partners|partnern|partner|partenaires|socios|vendors|fornitori)\b/gi,
47
+ /\b\d{2,4} iab[- ]partner/gi,
48
+ // "technologies like cookies", in each language
49
+ /\btechnolog(?:ies|ien|ieën|ías|ie) (?:like|such as|wie|zoals|como(?: las)?|telles que(?: les)?|come(?: i)?) cookies?\b/gi,
50
+ /\buses (?:\S+ ){0,2}cookies\b/gi,
51
+ /\b(?:like|want) to (?:use|set) (?:\S+ ){0,2}cookies\b/gi,
52
+ /\b(?:optional|additional|non-essential) cookies\b/gi,
53
+ /\bstoring of cookies\b|\bplaced cookies\b/gi,
54
+ /\b(?:store|stores) and access (?:data|information) on your device\b|\baccess and store (?:data|information) on your device\b/gi,
55
+ /\bwe use (?:\S+ ){1,4}cookies\b/gi,
56
+ // US privacy notices: opt-out sentences, not the footer link labels
57
+ /\byou (?:can|may) opt[- ]out of (?:the |this )?(?:sale|sharing|use|selling)\b/gi,
58
+ /\b(?:if you wish to|to) opt[- ]out of the sale\b/gi,
59
+ /\bthis website or its third[- ]party tools (?:process|use)\b/gi,
60
+ /["“]?(?:share|sell)["”]? or ["“]?(?:sell|share)["”]? (?:your )?(?:personal )?information\b/gi,
61
+ /\bresidents have (?:certain )?rights with regard to the sale\b/gi,
62
+ /\bwe use technologies (?:on this website )?(?:that may )?(?:to )?collect\b/gi,
63
+ // pay-or-consent walls
64
+ /\bcontinue reading with advertising\b|\b(?:with|mit) (?:advertising|werbung) (?:and|und) tracking\b/gi,
65
+ /\bconsent and continue\b/gi,
66
+ // preference centres are often in the page but hidden, so popup text only
67
+ { pattern: /\bstore or retrieve information on your browser\b|\bstockées dans votre navigateur ou récupérées\b/gi, input: 'popup' },
24
68
 
25
69
  // it might be tempting to add the patterns below, but they cause too many false positives. Don't do it :)
26
70
  // /cookies? settings/i,
@@ -38,27 +82,33 @@ export const DETECT_PATTERNS = [
38
82
  /consentement.{0,100}à.{0,100}tout.{0,100}moment/gi,
39
83
  /votre.{0,100}consentement/gi,
40
84
  /accepter.{0,100}tout/gi,
41
- /utilisation.{0,100}des.{0,100}cookies/gi,
85
+ UTILISATION_DES_COOKIES,
42
86
  /cookies.{0,100}ou.{0,100}technologies/gi,
43
- /acceptez.{0,100}l.{0,100}utilisation/gi,
87
+ ACCEPTEZ_UTILISATION,
44
88
  /continuer sans accepter/gi,
45
89
  /tout refuser/gi,
46
90
  /(?:refuser|rejeter) tous les cookies/gi,
47
- /je refuse/gi,
91
+ // not "je refuse d'…" in a headline
92
+ /je refuse(?! d['’e])/gi,
48
93
  /refuser et continuer/gi,
49
94
  /refuser les cookies/gi,
50
95
  /seulement nécessaires/gi,
51
96
  /je désactive les finalités non essentielles/gi,
52
97
  /cookies essentiels uniquement/gi,
53
98
  /nécessaires uniquement/gi,
99
+ /\b(?:stocker|stockons) et\/ou (?:accéder|accédons)\b/gi,
100
+ /\bnos partenaires demandent votre consentement\b/gi,
101
+ /\bconsentez à l.utilisation (?:de |des )?cookies\b|\bdépôt (?:de|des) cookies\b/gi,
102
+ /\bles cookies nous permettent\b|\bnos partenaires et nous(?:-mêmes)?\b/gi,
103
+ /\baccepter (?:&|et) fermer\b/gi,
54
104
 
55
105
  // DE
56
106
  /wir.{0,100}verwenden.{0,100}cookies/gi,
57
107
  /wir.{0,100}und.{0,100}unsere.{0,100}partner/gi,
58
- /zugriff.{0,100}auf.{0,100}informationen.{0,100}auf/gi,
108
+ /zugriff auf informationen auf/gi,
59
109
  /inhalte.{0,100}messung.{0,100}von.{0,100}werbeleistung.{0,100}und/gi,
60
110
  /cookies.{0,100}und.{0,100}andere/gi,
61
- /verwendung.{0,100}von.{0,100}cookies/gi,
111
+ VERWENDUNG_VON_COOKIES,
62
112
  /wir.{0,100}nutzen.{0,100}cookies/gi,
63
113
  /verwendet.{0,100}cookies/gi,
64
114
  /sie.{0,100}können.{0,100}ihre.{0,100}auswahl/gi,
@@ -72,9 +122,21 @@ export const DETECT_PATTERNS = [
72
122
  /nur funktionale cookies akzeptieren/gi,
73
123
  /optionale ablehnen/gi,
74
124
  /zustimmung verweigern/gi,
125
+ /\bspeichern und\/oder (?:zugreifen|abrufen)\b/gi,
126
+ /\bunsere partner bitten um ihre zustimmung\b/gi,
127
+ DE_COOKIE_VERB,
128
+ /\b(?:werden|wird) (?:\S+ ){0,3}cookies (?:verwendet|eingesetzt|gesetzt|genutzt)\b/gi,
129
+ /\bcookies? zum einsatz\b|\beinsatz von cookies\b/gi,
130
+ /\beinverstanden\b.{0,60}\bcookies\b|\bcookies\b.{0,80}\beinverstanden\b/gi,
131
+ /\b(?:alle|alles) (?:cookies |optionalen \S+ )?(?:akzeptieren|zulassen|erlauben|zustimmen)\b/gi,
132
+ /\bzustimmen und weiter\b|\bweiter,? ohne zu (?:akzeptieren|zustimmen)\b/gi,
133
+ /\b(?:einwilligung|zustimmung) (?:zu|zur|in die) (?:\S+ )?cookies\b|\bcookie-(?:zustimmung|einwilligung)\b/gi,
134
+ /\btracking-technologien\b/gi,
135
+ /\bakzeptier\w* (?:du |sie )?(?:die )?verwendung (?:\S+ )?cookies\b/gi,
136
+ /\bmit werbetracking weiterlesen\b|\bweiter mit werbung\b|\bcon tracking e annunci\b/gi,
75
137
 
76
138
  // NL
77
- /gebruik.{0,100}van.{0,100}cookies/gi,
139
+ GEBRUIK_VAN_COOKIES,
78
140
  /(?:we|wij).{0,100}gebruiken.{0,100}cookies.{0,100}om/gi,
79
141
  /cookies.{0,100}en.{0,100}vergelijkbare/gi,
80
142
 
@@ -85,6 +147,13 @@ export const DETECT_PATTERNS = [
85
147
  /doorgaan zonder (?:te accepteren|akkoord te gaan)/gi,
86
148
  /alleen.{0,100}(?:optionele|functionele|functioneel|noodzakelijke|essentiële).{0,100}cookies/gi,
87
149
  /wijs alles af/gi,
150
+ /\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,
151
+ /\bonze partners vragen om (?:jouw|uw|je) toestemming\b/gi,
152
+ /\bwij en onze (?:\d+ )?partners\b/gi,
153
+ /\b(?:gebruiken|gebruikt|plaatsen|plaatst)\b(?: \S+){0,3} cookies\b/gi,
154
+ /\baccepteer (?:alles|alle cookies)\b/gi,
155
+ // Dutch words only: "tracking cookies" and "marketing cookies" are also English prose and footer links
156
+ /\b(?:analytische|functionele|essentiële|noodzakelijke) cookies\b/gi,
88
157
 
89
158
  // Spanish (ES)
90
159
  /(si|al) contin[úu]a[sr]?( navegando)?.{0,100} cookie/gi,
@@ -102,6 +171,15 @@ export const DETECT_PATTERNS = [
102
171
  /nosotros y nuestros( \d+)? (socios|proveedores).{0,180} cookies/gi,
103
172
  /recopilamos y almacenamos datos de usted y de su dispositivo/gi,
104
173
  /utilizamos tecnolog[ií]as como las cookies/gi,
174
+ /\b(?:almacenar|almacenamos) y\/o (?:acceder|accedemos)\b/gi,
175
+ /\bnuestros socios solicitan su consentimiento\b/gi,
176
+ /\b(?:tanto nosotros como|nosotros y) nuestros (?:\d+ )?socios\b/gi,
177
+ /\b(?:aceptar|rechazar) todas\b|\bcontinuar sin aceptar\b|\bsolo las necesarias\b/gi,
178
+ /\bacept\w* (?:\S+ ){0,3}uso de (?:las )?cookies\b/gi,
179
+ /\bcookies (?:técnicas|analíticas|propias|de terceros|opcionales|necesarias)\b/gi,
180
+ /\blas cookies nos (?:ayudan|permiten)\b/gi,
181
+ /\b(?:instalamos|empleamos)\b(?: \S+){0,4} cookies\b/gi,
182
+ /\bacept(?:a|ar|as)? (?:el uso de |las )?(?:\S+ )?cookies\b|\bnecesitamos usar cookies\b/gi,
105
183
 
106
184
  // Polish (PL)
107
185
  // examples:
@@ -132,10 +210,11 @@ export const DETECT_PATTERNS = [
132
210
  // Catalan (CA)
133
211
  /cookies pròpies i de tercers/gi,
134
212
  /utilitzem galetes/gi,
135
- /\búnicament utilitza galetes pròpies amb finalitat tècnica\b/gi,
213
+ /únicament utilitza galetes pròpies amb finalitat tècnica\b/gi,
136
214
  /este lloc web utilitza només cookies tècniques necessàries per al seu funcionament/gi,
137
215
  /utilitza cookies tècniques,\s*de personalització i anàlisi/gi,
138
216
  /utilitzem cookies i altres tecnologies/gi,
217
+ /\b(?:utilitz\w*|fa servir|fem servir|usem)\b(?: \S+){0,3} (?:cookies|galetes)\b/gi,
139
218
 
140
219
  // Basque (EU)
141
220
  /cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu/gi,
@@ -169,7 +248,18 @@ export const DETECT_PATTERNS = [
169
248
  /(?:usiamo|utilizziamo).{0,20}cookie/gi,
170
249
  /sito.{0,50}(?:usa|utilizza).{0,20}cookie/gi,
171
250
  /noi e i nostri.{0,20}partner.{0,100}cookie/gi,
172
- /(?:archiviare|memorizzare) e\/o accedere a informazioni su un dispositivo/gi,
251
+ /\b(?:utilizziamo|usiamo|impieghiamo|installiamo)\b(?: \S+){0,3} cookies?\b/gi,
252
+ /\b(?:utilizza|utilizzano|usa|usano|impiega|installa|fa uso di)\b(?: \S+){0,3} cookies?\b/gi,
253
+ /\bcookies? (?:tecnici|di profilazione|di terze parti|analitici|statistici|di marketing)\b/gi,
254
+ /\b(?:acconsent|accett)\w*\b.{0,40}\b(?:uso|utilizzo|installazione)\b.{0,15}\bcookies?\b/gi,
255
+ /\b(?:continuando|proseguendo)(?: la| nella)? navigazione\b.{0,80}\b(?:accett|acconsent)\w*/gi,
256
+ /\b(?:accetta|accetto|accettare|rifiuta|rifiuto|rifiutare)(?: tutti| tutto)\b/gi,
257
+ /\b(?:continua|prosegui|chiudi) senza accettare\b/gi,
258
+ /\brifiuta e abbonati\b/gi,
259
+ /\bconsenso (?:all.(?:uso|utilizzo) (?:dei |di )?)?cookies?\b/gi,
260
+ /\b(?:insieme ai|con i) nostri (?:\d+ )?partner\b/gi,
261
+ /\bterze parti selezionate\b/gi,
262
+ /\b(?:archiviare|archiviamo|memorizzare|memorizziamo) e\/o (?:accedere|accediamo)\b/gi,
173
263
 
174
264
  // Swedish (SV)
175
265
  // e.g. "vi använder cookies", "vi använder spårningstekniker såsom cookies", "webbplatsen använder kakor"
@@ -507,29 +597,12 @@ export const BUTTON_NEVER_MATCH_PATTERNS = [
507
597
  /подписатьс|подписк|оплатит|оплачива/is,
508
598
  ];
509
599
 
510
- // Popup body-text patterns that suppress heuristic detection. Currently targets age gates and adult-content disclaimers whose "reject" button leads to a dead end.
511
- // Applied only to popup-scoped text (via getActionablePopups); NOT applied to full-document detection, where these terms produce too many false positives.
512
- export const DETECT_NEVER_MATCH_PATTERNS = [
513
- // e.g. "age verification", "age confirmation", "age check", "age gate", "age restriction"
514
- /age\s+(?:verification|confirmation|check|gate|restriction)/i,
515
- // e.g. "over 18 years", "at least 21 years", "older than 21", "18+"
516
- /(?:over|above|at\s*least|minimum|older\s+than)\s*(?:18|21)\s*(?:years|yo|y\.?o\.?|\+)?/i,
517
- // e.g. "18 years of age", "18+ years old", "21 years or older"
518
- /(?:18|21)\s*(?:\+|years?)\s*(?:of\s*age|or\s*older|or\s*above)/i,
519
- // e.g. "I am 18+", "I am over 18", "I'm 21 or older"
520
- /(?:i'?m|i\s*am)\s*(?:over|above|at\s*least)?\s*(?:18|21)(?:\+|\s*(?:or\s*older|years))?/i,
521
- // e.g. "you must be 18", "users must be at least 21", "visitors must be over 18"
522
- /(?:you|users?|visitors?)\s+must\s+be\s+(?:over|above|at\s*least)?\s*(?:18|21)/i,
523
- // e.g. "adult oriented material", "adult content", "adult-only website"
524
- /adult[\s-]+(?:oriented|only|content|material|websites?)/i,
525
- ];
526
-
527
600
  export const SETTINGS_PATTERNS = [
528
601
  // Multilingual "open customization" patterns: a customization verb next to a
529
602
  // cookie/preference/settings/options/details/purposes noun (both word orders).
530
603
  // The negative lookahead avoids policy links and save/confirm/accept phrases (those are accept/acknowledge/other).
531
- /^(?!.*\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)\b.{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,
532
- /^(?!.*\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)\b/is,
604
+ /^(?!.*\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,
605
+ /^(?!.*\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,
533
606
 
534
607
  // settings noun + cookies, e.g. "paramètres des cookies", "ajustes de cookies", "instellingen voor cookies en diensten"
535
608
  /^(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,
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Required-literal prefilter for heuristic detect patterns (see docs/heuristic-prefilter.md): each built-in pattern has
3
+ * literals that any match must contain, generated at build time into heuristic-literals.ts. A text is checked for all
4
+ * of them in one pass, and a pattern whose literals are all absent can't match, so it is skipped without changing any
5
+ * result.
6
+ */
7
+
8
+ /**
9
+ * Finds which literals a text contains in one pass: a zero-width lookahead over the literals, longest first, reports
10
+ * the longest one starting at each position, and any other literal starting there is a prefix of it.
11
+ */
12
+ export function literalIndex(all: string[]): { present: (lower: string) => Set<string> } {
13
+ const distinct = [...new Set(all)].sort((a, b) => b.length - a.length);
14
+ if (distinct.length === 0) {
15
+ return { present: () => new Set() };
16
+ }
17
+ const escape = (l: string) => l.replace(/[.*+?^${}()|[\]\\/]/g, '\\$&');
18
+ const any = new RegExp(`(?=(${distinct.map(escape).join('|')}))`, 'g');
19
+ // which literals a reported one implies (itself and its prefixes), worked out only for literals a page contains
20
+ const implies = new Map<string, string[]>();
21
+ const impliedBy = (m: string) => {
22
+ let list = implies.get(m);
23
+ if (!list) {
24
+ list = distinct.filter((l) => m.startsWith(l));
25
+ implies.set(m, list);
26
+ }
27
+ return list;
28
+ };
29
+ return {
30
+ present(lower: string) {
31
+ const found = new Set<string>();
32
+ for (const m of lower.matchAll(any)) {
33
+ if (!found.has(m[1])) {
34
+ impliedBy(m[1]).forEach((l) => found.add(l));
35
+ }
36
+ }
37
+ return found;
38
+ },
39
+ };
40
+ }
package/lib/heuristics.ts CHANGED
@@ -1,9 +1,13 @@
1
- import { classifyButtons, classifyPopup, hasHeuristicPatterns, isExcludedPopup } from './heuristic-classify';
1
+ import { classifyButtons, classifyPopup, DETECT_CONTEXT_NEGATIVES, hasHeuristicPatterns } from './heuristic-classify';
2
2
  import { ButtonData, HeuristicLevel, HitTestGrid, PopupClassification, PopupData } from './types';
3
3
  import { isElementVisible, isTopFrame } from './utils';
4
4
 
5
5
  const BUTTON_LIKE_ELEMENT_SELECTOR = 'button, input[type="button"], input[type="submit"], a, [role="button"], [class*="button"]';
6
6
  const POPUP_SEARCH_MAX_TIME = 100;
7
+ // the search climbs to a popup's root before isConsentPopup applies the whole-text exclusions, such as age gates
8
+ const FRAGMENT_NEGATIVES = DETECT_CONTEXT_NEGATIVES.filter((n) => !n.whole);
9
+ // the text looks like part of a consent popup, before the whole-text exclusions
10
+ const hasFragmentPatterns = (text: string) => hasHeuristicPatterns(text, 'popup', { negatives: FRAGMENT_NEGATIVES });
7
11
 
8
12
  // popup classifications the heuristic rule can act on, by heuristic mode
9
13
  const ACCEPTED_LEVELS: Record<HeuristicLevel, PopupClassification[]> = {
@@ -71,7 +75,7 @@ function isConsentPopup(popup: PopupData): boolean {
71
75
  let result = consentPopups.get(popup);
72
76
  if (result === undefined) {
73
77
  const popupText = popup.text.trim();
74
- result = !!popupText && !isExcludedPopup(popupText) && hasHeuristicPatterns(popupText);
78
+ result = !!popupText && hasHeuristicPatterns(popupText, 'popup');
75
79
  consentPopups.set(popup, result);
76
80
  }
77
81
  return result;
@@ -250,7 +254,7 @@ function isOnlyButtonText(text: string, buttons: ButtonData[]): boolean {
250
254
  function toPopupRoot(el: HTMLElement, shadowHosts?: HTMLElement[]): PopupData | null {
251
255
  // check the text first: it is cheaper than collecting buttons
252
256
  const text = getElementText(el);
253
- if (!text || !hasHeuristicPatterns(text)) {
257
+ if (!text || !hasFragmentPatterns(text)) {
254
258
  return null;
255
259
  }
256
260
  const popup = toPopupData(el, shadowHosts, text);
@@ -295,7 +299,7 @@ function climbToPopup(
295
299
  */
296
300
  function expandPopupFragment(popup: PopupData, shadowHosts?: HTMLElement[]): PopupData {
297
301
  // the same acceptance check as toPopupRoot, on the buttons already collected
298
- if (hasHeuristicPatterns(popup.text) && hasPopupButtons(popup.text, popup.buttons)) {
302
+ if (hasFragmentPatterns(popup.text) && hasPopupButtons(popup.text, popup.buttons)) {
299
303
  return popup;
300
304
  }
301
305
  const parent = getComposedParent(popup.element);
package/lib/web.ts CHANGED
@@ -350,7 +350,7 @@ export default class AutoConsent {
350
350
  detectHeuristics() {
351
351
  if (this.config.enableHeuristicDetection) {
352
352
  this.config.performanceLoggingEnabled && performance.mark('detectHeuristicsStart');
353
- const { patterns, snippets } = checkHeuristicPatterns(document.documentElement?.innerText || '');
353
+ const { patterns, snippets } = checkHeuristicPatterns(document.documentElement?.innerText || '', 'page');
354
354
  if (
355
355
  patterns.length > 0 &&
356
356
  (patterns.length !== this.state.heuristicPatterns.length || this.state.heuristicPatterns.some((p, i) => p !== patterns[i]))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckduckgo/autoconsent",
3
- "version": "17.4.0",
3
+ "version": "18.1.0",
4
4
  "description": "",
5
5
  "types": "./dist/types/web.d.ts",
6
6
  "exports": {
@@ -34,6 +34,7 @@
34
34
  "test:chrome": "playwright test --project chrome",
35
35
  "test:lib": "web-test-runner",
36
36
  "test:sample": "playwright test tests/_sample-test.spec.ts --project webkit",
37
+ "build-heuristic-literals": "ts-node scripts/build-heuristic-literals.ts",
37
38
  "build-rules": "ts-node rules/build.ts",
38
39
  "version": "node update_version.js && git add addon/manifest.*.json",
39
40
  "vendor-copy": "mkdir -p addon/vendor && cp node_modules/mocha/mocha.* addon/vendor/ && cp node_modules/chai/chai.js addon/vendor/",
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "binogi",
3
+ "vendorUrl": "https://www.binogi.se/",
4
+ "prehideSelectors": ["#binogi_cookie_notice"],
5
+ "detectCmp": [
6
+ {
7
+ "exists": "#binogi_cookie_notice #cnreject"
8
+ }
9
+ ],
10
+ "detectPopup": [
11
+ {
12
+ "visible": "#binogi_cookie_notice"
13
+ }
14
+ ],
15
+ "optIn": [
16
+ {
17
+ "waitForThenClick": "#binogi_cookie_notice #cnaccept"
18
+ }
19
+ ],
20
+ "optOut": [
21
+ {
22
+ "waitForThenClick": "#binogi_cookie_notice #cnreject",
23
+ "retry": 3
24
+ }
25
+ ],
26
+ "test": [
27
+ {
28
+ "visible": "#binogi_cookie_notice",
29
+ "check": "none"
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "bokio",
3
+ "runContext": {
4
+ "urlPattern": "^https?://(www\\.)?bokio\\.(se|co\\.uk)/"
5
+ },
6
+ "prehideSelectors": ["#cookiemodal"],
7
+ "detectCmp": [
8
+ {
9
+ "exists": "#cookiemodal #cookie-donottrack"
10
+ }
11
+ ],
12
+ "detectPopup": [
13
+ {
14
+ "visible": "#cookiemodal:not(.cookiemodal--hidden) #cookie-donottrack"
15
+ }
16
+ ],
17
+ "optIn": [
18
+ {
19
+ "waitForThenClick": "#cookiemodal #cookie-dotrack"
20
+ }
21
+ ],
22
+ "optOut": [
23
+ {
24
+ "waitForThenClick": "#cookiemodal #cookie-donottrack"
25
+ }
26
+ ],
27
+ "test": [
28
+ {
29
+ "cookieContains": "BokioDNT=DoNotTrack"
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "botble-cookie-consent",
3
+ "vendorUrl": "https://botble.com/",
4
+ "prehideSelectors": [".js-cookie-consent:has(.js-cookie-consent-reject)"],
5
+ "detectCmp": [{ "exists": ".js-cookie-consent .js-cookie-consent-reject" }],
6
+ "detectPopup": [{ "visible": ".js-cookie-consent:not(.is-hidden) .js-cookie-consent-reject" }],
7
+ "optIn": [{ "waitForThenClick": ".js-cookie-consent :is(.js-cookie-consent-agree, .js-cookie-consent-accept)" }],
8
+ "optOut": [
9
+ {
10
+ "waitForThenClick": ".js-cookie-consent:not(.is-hidden) .js-cookie-consent-reject",
11
+ "retry": 5,
12
+ "retryInterval": 500
13
+ }
14
+ ],
15
+ "test": [{ "visible": ".js-cookie-consent:not(.is-hidden) .js-cookie-consent-reject", "check": "none" }]
16
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "calcolo.tools",
3
+ "runContext": {
4
+ "urlPattern": "^https?://(www\\.)?calcolo\\.tools/"
5
+ },
6
+ "prehideSelectors": ["#cc-banner"],
7
+ "detectCmp": [{ "visible": "#cc-banner #cc-reject" }],
8
+ "detectPopup": [{ "visible": "#cc-banner #cc-reject" }],
9
+ "optIn": [{ "waitForThenClick": "#cc-banner #cc-accept" }],
10
+ "optOut": [
11
+ { "waitForThenClick": "#cc-banner #cc-reject" },
12
+ { "waitFor": ".fc-cta-do-not-consent,.fc-cta-manage-options,.fc-li-only-placeholder", "timeout": 5000, "optional": true },
13
+ {
14
+ "if": { "exists": ".fc-cta-do-not-consent,.fc-cta-manage-options,.fc-li-only-placeholder" },
15
+ "then": [
16
+ { "click": ".fc-cta-do-not-consent,.fc-cta-manage-options", "optional": true },
17
+ { "click": ".fc-preference-consent:checked,.fc-preference-legitimate-interest:checked", "all": true, "optional": true },
18
+ { "click": ".fc-confirm-choices", "optional": true }
19
+ ]
20
+ }
21
+ ],
22
+ "test": [{ "visible": "#cc-banner", "check": "none" }]
23
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "consilium-europa-eu",
3
+ "vendorUrl": "https://www.consilium.europa.eu/",
4
+ "runContext": {
5
+ "urlPattern": "^https://(www\\.)?consilium\\.europa\\.eu/"
6
+ },
7
+ "prehideSelectors": [],
8
+ "detectCmp": [
9
+ {
10
+ "exists": "gsc-cookie-banner"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": ["gsc-cookie-banner", "dialog[data-consent-banner]"]
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": ["gsc-cookie-banner", ".gsc-cookie-banner__actions gsc-button:last-child"]
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "waitForThenClick": ["gsc-cookie-banner", ".gsc-cookie-banner__actions gsc-button:first-child"]
26
+ }
27
+ ],
28
+ "test": [
29
+ {
30
+ "waitForVisible": ["gsc-cookie-banner", "dialog[data-consent-banner]"],
31
+ "check": "none",
32
+ "timeout": 2000
33
+ }
34
+ ]
35
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "dtu-findit",
3
+ "vendorUrl": "https://findit.dtu.dk/",
4
+ "runContext": {
5
+ "urlPattern": "^https?://findit\\.dtu\\.dk/"
6
+ },
7
+ "prehideSelectors": [],
8
+ "detectCmp": [
9
+ {
10
+ "exists": ".js-overlay .js-consent .js-consent-selected"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": ".js-overlay .js-consent .js-consent-selected"
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": ".js-consent .js-consent-allow"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "if": {
26
+ "exists": ".js-consent .js-consent-option.is-selected[data-value=stat]"
27
+ },
28
+ "then": [
29
+ {
30
+ "click": ".js-consent .js-consent-option.is-selected[data-value=stat]"
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ "waitForThenClick": ".js-consent .js-consent-selected"
36
+ }
37
+ ],
38
+ "test": [
39
+ {
40
+ "cookieContains": "cks=req"
41
+ },
42
+ {
43
+ "cookieContains": "stat",
44
+ "negated": true
45
+ }
46
+ ]
47
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "hikvision.com",
3
+ "comment": "Variant without a reject button. The only dismiss control is an SVG close icon, which just hides the banner without storing a choice.",
4
+ "cosmetic": true,
5
+ "runContext": {
6
+ "main": true,
7
+ "frame": false,
8
+ "urlPattern": "^https?://(\\w+\\.)?hikvision\\.com/"
9
+ },
10
+ "prehideSelectors": [],
11
+ "detectCmp": [
12
+ { "exists": "section.gdpr-wrapper .gdpr-button-accept" },
13
+ { "exists": "section.gdpr-wrapper .gdpr-button-reject", "negated": true }
14
+ ],
15
+ "detectPopup": [{ "visible": "section.gdpr-wrapper" }],
16
+ "optIn": [{ "waitForThenClick": "section.gdpr-wrapper .gdpr-button-accept" }],
17
+ "optOut": [{ "hide": "section.gdpr-wrapper" }]
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "hmgroup-turbocookie",
3
+ "prehideSelectors": [".cookie-consent-popup"],
4
+ "detectCmp": [{ "exists": ".cookie-consent-popup #banner-accept-btn" }],
5
+ "detectPopup": [{ "visible": ".cookie-consent-popup" }],
6
+ "optIn": [{ "waitForThenClick": ".cookie-consent-popup #banner-accept-btn" }],
7
+ "optOut": [
8
+ {
9
+ "if": { "exists": ".cookie-consent-popup #banner-reject-btn" },
10
+ "then": [{ "waitForThenClick": ".cookie-consent-popup #banner-reject-btn" }],
11
+ "else": [
12
+ { "waitForThenClick": ".cookie-consent-popup #banner-cookie-setting-btn" },
13
+ { "waitForThenClick": ".settings-page #settings-only-required-btn" }
14
+ ]
15
+ }
16
+ ],
17
+ "test": [{ "wait": 500 }, { "cookieContains": "groups=C0001:1,C0002:0,C0003:0,C0004:0" }]
18
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "hmrc-tracking-consent",
3
+ "prehideSelectors": [".cbanner-govuk-cookie-banner"],
4
+ "detectCmp": [
5
+ {
6
+ "exists": ".cbanner-govuk-cookie-banner button[value=reject]"
7
+ }
8
+ ],
9
+ "detectPopup": [
10
+ {
11
+ "visible": ".cbanner-govuk-cookie-banner button[value=reject]"
12
+ }
13
+ ],
14
+ "optIn": [
15
+ {
16
+ "waitForThenClick": ".cbanner-govuk-cookie-banner button[value=accept]"
17
+ },
18
+ {
19
+ "waitForThenClick": ".cbanner-govuk-cookie-banner button:not([value])",
20
+ "timeout": 3000,
21
+ "optional": true
22
+ }
23
+ ],
24
+ "optOut": [
25
+ {
26
+ "waitForThenClick": ".cbanner-govuk-cookie-banner button[value=reject]"
27
+ },
28
+ {
29
+ "comment": "a confirmation message with a hide button replaces the banner after the choice",
30
+ "waitForThenClick": ".cbanner-govuk-cookie-banner button:not([value])",
31
+ "timeout": 3000,
32
+ "optional": true
33
+ }
34
+ ],
35
+ "test": [
36
+ {
37
+ "cookieContains": "%22measurement%22:false"
38
+ }
39
+ ]
40
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "hurra-consent",
3
+ "_metadata": { "vendorUrl": "https://www.hurra.com/" },
4
+ "prehideSelectors": ["#JOISH987_bar_holder"],
5
+ "detectCmp": [{ "exists": "#JOISH987_bar_holder #JOISH987_bar" }],
6
+ "detectPopup": [{ "visible": "#JOISH987_bar_holder" }],
7
+ "optIn": [{ "waitForThenClick": "#JOISH987_acceptAllBar_btn" }],
8
+ "optOut": [
9
+ {
10
+ "if": { "visible": "#JOISH987_rejectBar_btn" },
11
+ "then": [{ "click": "#JOISH987_rejectBar_btn" }],
12
+ "else": [{ "waitForThenClick": "#JOISH987_inlineRejectBar_btn" }]
13
+ }
14
+ ],
15
+ "test": [{ "waitForVisible": "#JOISH987_bar_holder", "timeout": 2000, "check": "none" }]
16
+ }