@duckduckgo/autoconsent 2.2.0 → 3.0.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 (74) hide show
  1. package/Jenkinsfile +2 -2
  2. package/dist/addon-firefox/background.bundle.js +1 -1
  3. package/dist/addon-firefox/content.bundle.js +1 -1
  4. package/dist/addon-firefox/manifest.json +2 -2
  5. package/dist/addon-firefox/rules.json +565 -7
  6. package/dist/addon-mv3/background.bundle.js +1 -1
  7. package/dist/addon-mv3/content.bundle.js +1 -1
  8. package/dist/addon-mv3/manifest.json +3 -2
  9. package/dist/addon-mv3/popup.bundle.js +1 -0
  10. package/dist/addon-mv3/popup.html +67 -0
  11. package/dist/addon-mv3/rules.json +565 -7
  12. package/dist/autoconsent.cjs.js +1 -1
  13. package/dist/autoconsent.esm.js +1 -1
  14. package/dist/autoconsent.playwright.js +1 -1
  15. package/lib/cmps/airbnb.ts +57 -0
  16. package/lib/cmps/all.ts +4 -0
  17. package/lib/cmps/base.ts +2 -2
  18. package/lib/cmps/onetrust.ts +3 -3
  19. package/lib/cmps/tiktok.ts +73 -0
  20. package/lib/cmps/trustarc-frame.ts +4 -1
  21. package/lib/cmps/uniconsent.ts +2 -1
  22. package/lib/rule-executors.ts +15 -15
  23. package/lib/rules.ts +1 -1
  24. package/lib/web.ts +14 -1
  25. package/package.json +2 -2
  26. package/playwright/runner.ts +8 -2
  27. package/playwright.config.ts +9 -0
  28. package/readme.md +5 -1
  29. package/rollup.config.js +16 -2
  30. package/rules/autoconsent/amazon.json +20 -0
  31. package/rules/autoconsent/dailymotion.json +22 -0
  32. package/rules/autoconsent/dmgmedia.json +19 -0
  33. package/rules/autoconsent/facebook.json +21 -0
  34. package/rules/autoconsent/google-consent-standalone.json +17 -0
  35. package/rules/autoconsent/google.json +22 -0
  36. package/rules/autoconsent/linkedin.json +23 -0
  37. package/rules/autoconsent/monzo-com.json +1 -6
  38. package/rules/autoconsent/moove.json +1 -1
  39. package/rules/autoconsent/privacymanager.json +30 -0
  40. package/rules/autoconsent/pubtech.json +42 -0
  41. package/rules/autoconsent/reddit.json +22 -0
  42. package/rules/autoconsent/sibbo.json +43 -0
  43. package/rules/autoconsent/twitter.json +22 -0
  44. package/rules/autoconsent/vodafone-de.json +1 -1
  45. package/rules/autoconsent/youtube-desktop.json +23 -0
  46. package/rules/autoconsent/youtube-mobile.json +22 -0
  47. package/rules/rules.json +565 -7
  48. package/tests/airbnb.spec.ts +8 -0
  49. package/tests/amazon.spec.ts +17 -0
  50. package/tests/complianz-banner.spec.ts +0 -2
  51. package/tests/complianz-categories.spec.ts +1 -1
  52. package/tests/dailymotion.spec.ts +14 -0
  53. package/tests/dmgmedia.spec.ts +16 -0
  54. package/tests/facebook.spec.ts +14 -0
  55. package/tests/google.spec.ts +7 -0
  56. package/tests/linkedin.spec.ts +7 -0
  57. package/tests/moove.spec.ts +1 -0
  58. package/tests/oil.spec.ts +3 -2
  59. package/tests/onetrust.spec.ts +2 -2
  60. package/tests/privacymanager.spec.ts +8 -0
  61. package/tests/pubtech.spec.ts +13 -0
  62. package/tests/reddit.spec.ts +8 -0
  63. package/tests/sibbo.spec.ts +15 -0
  64. package/tests/tiktok.spec.ts +14 -0
  65. package/tests/twitter.spec.ts +16 -0
  66. package/tests/wp-cookie-notice.spec.ts +1 -1
  67. package/tests/youtube-desktop.spec.ts +7 -0
  68. package/tests/youtube-mobile.spec.ts +8 -0
  69. package/.vscode/.idea/.vscode.iml +0 -9
  70. package/.vscode/.idea/modules.xml +0 -8
  71. package/.vscode/.idea/workspace.xml +0 -28
  72. package/.vscode/settings.json +0 -7
  73. package/lib/web/consentomatic/index.js +0 -188
  74. package/lib/web/consentomatic/tools.js +0 -177
@@ -106,6 +106,44 @@
106
106
  }
107
107
  ]
108
108
  },
109
+ {
110
+ "name": "amazon.com",
111
+ "prehideSelectors": [
112
+ "span[data-action=\"sp-cc\"][data-sp-cc*=\"rejectAllAction\"]"
113
+ ],
114
+ "detectCmp": [
115
+ {
116
+ "exists": "span[data-action=\"sp-cc\"][data-sp-cc*=\"rejectAllAction\"]"
117
+ }
118
+ ],
119
+ "detectPopup": [
120
+ {
121
+ "visible": "span[data-action=\"sp-cc\"][data-sp-cc*=\"rejectAllAction\"]"
122
+ }
123
+ ],
124
+ "optIn": [
125
+ {
126
+ "waitForVisible": "#sp-cc-accept"
127
+ },
128
+ {
129
+ "wait": 500
130
+ },
131
+ {
132
+ "click": "#sp-cc-accept"
133
+ }
134
+ ],
135
+ "optOut": [
136
+ {
137
+ "waitForVisible": "#sp-cc-rejectall-link"
138
+ },
139
+ {
140
+ "wait": 500
141
+ },
142
+ {
143
+ "click": "#sp-cc-rejectall-link"
144
+ }
145
+ ]
146
+ },
109
147
  {
110
148
  "name": "arzt-auskunft.de",
111
149
  "prehideSelectors": [
@@ -756,6 +794,40 @@
756
794
  }
757
795
  ]
758
796
  },
797
+ {
798
+ "name": "dailymotion.com",
799
+ "runContext": {
800
+ "urlPattern": "^https://(www\\.)?dailymotion\\.com/"
801
+ },
802
+ "prehideSelectors": [
803
+ "div[class*=\"Overlay__container\"]:has(div[class*=\"TCF2Popup\"])"
804
+ ],
805
+ "detectCmp": [
806
+ {
807
+ "exists": "div[class*=\"TCF2Popup\"]"
808
+ }
809
+ ],
810
+ "detectPopup": [
811
+ {
812
+ "visible": "[class*=\"TCF2Popup\"] a[href^=\"https://www.dailymotion.com/legal/cookiemanagement\"]"
813
+ }
814
+ ],
815
+ "optIn": [
816
+ {
817
+ "waitForThenClick": "button[class*=\"TCF2Popup__button\"]:not([class*=\"TCF2Popup__personalize\"])"
818
+ }
819
+ ],
820
+ "optOut": [
821
+ {
822
+ "waitForThenClick": "button[class*=\"TCF2ContinueWithoutAcceptingButton\"]"
823
+ }
824
+ ],
825
+ "test": [
826
+ {
827
+ "eval": "!!document.cookie.match('dm-euconsent-v2')"
828
+ }
829
+ ]
830
+ },
759
831
  {
760
832
  "name": "deepl.com",
761
833
  "prehideSelectors": [
@@ -782,6 +854,42 @@
782
854
  }
783
855
  ]
784
856
  },
857
+ {
858
+ "name": "dmgmedia",
859
+ "prehideSelectors": [
860
+ "[data-project=\"mol-fe-cmp\"]"
861
+ ],
862
+ "detectCmp": [
863
+ {
864
+ "exists": "[data-project=\"mol-fe-cmp\"]"
865
+ }
866
+ ],
867
+ "detectPopup": [
868
+ {
869
+ "visible": "[data-project=\"mol-fe-cmp\"]"
870
+ }
871
+ ],
872
+ "optIn": [
873
+ {
874
+ "waitForThenClick": "[data-project=\"mol-fe-cmp\"] button[class*=primary]"
875
+ }
876
+ ],
877
+ "optOut": [
878
+ {
879
+ "waitForThenClick": "[data-project=\"mol-fe-cmp\"] button[class*=basic]"
880
+ },
881
+ {
882
+ "waitForVisible": "[data-project=\"mol-fe-cmp\"] div[class*=\"tabContent\"]"
883
+ },
884
+ {
885
+ "waitForThenClick": "[data-project=\"mol-fe-cmp\"] div[class*=\"toggle\"][class*=\"enabled\"]",
886
+ "all": true
887
+ },
888
+ {
889
+ "waitForThenClick": "[data-project=\"mol-fe-cmp\"] button[class*=white]"
890
+ }
891
+ ]
892
+ },
785
893
  {
786
894
  "name": "Drupal",
787
895
  "detectCmp": [
@@ -1032,6 +1140,43 @@
1032
1140
  }
1033
1141
  ]
1034
1142
  },
1143
+ {
1144
+ "name": "facebook",
1145
+ "runContext": {
1146
+ "urlPattern": "^https://([a-z0-9-]+\\.)?facebook\\.com/"
1147
+ },
1148
+ "prehideSelectors": [
1149
+ "div[data-testid=\"cookie-policy-manage-dialog\"]"
1150
+ ],
1151
+ "detectCmp": [
1152
+ {
1153
+ "exists": "div[data-testid=\"cookie-policy-manage-dialog\"]"
1154
+ }
1155
+ ],
1156
+ "detectPopup": [
1157
+ {
1158
+ "visible": "div[data-testid=\"cookie-policy-manage-dialog\"]"
1159
+ }
1160
+ ],
1161
+ "optIn": [
1162
+ {
1163
+ "waitForThenClick": "button[data-cookiebanner=\"accept_button\"]"
1164
+ },
1165
+ {
1166
+ "waitForVisible": "div[data-testid=\"cookie-policy-manage-dialog\"]",
1167
+ "check": "none"
1168
+ }
1169
+ ],
1170
+ "optOut": [
1171
+ {
1172
+ "waitForThenClick": "button[data-cookiebanner=\"accept_only_essential_button\"]"
1173
+ },
1174
+ {
1175
+ "waitForVisible": "div[data-testid=\"cookie-policy-manage-dialog\"]",
1176
+ "check": "none"
1177
+ }
1178
+ ]
1179
+ },
1035
1180
  {
1036
1181
  "name": "funding-choices",
1037
1182
  "prehideSelectors": [
@@ -1067,6 +1212,67 @@
1067
1212
  }
1068
1213
  ]
1069
1214
  },
1215
+ {
1216
+ "name": "google-consent-standalone",
1217
+ "prehideSelectors": [],
1218
+ "detectCmp": [
1219
+ {
1220
+ "exists": "a[href^=\"https://policies.google.com/technologies/cookies\""
1221
+ },
1222
+ {
1223
+ "exists": "form[action^=\"https://consent.\"][action$=\".com/save\"]"
1224
+ }
1225
+ ],
1226
+ "detectPopup": [
1227
+ {
1228
+ "visible": "a[href^=\"https://policies.google.com/technologies/cookies\""
1229
+ }
1230
+ ],
1231
+ "optIn": [
1232
+ {
1233
+ "waitForThenClick": "form[action^=\"https://consent.\"][action$=\".com/save\"]:has(input[name=set_eom][value=false]) button"
1234
+ }
1235
+ ],
1236
+ "optOut": [
1237
+ {
1238
+ "waitForThenClick": "form[action^=\"https://consent.\"][action$=\".com/save\"]:has(input[name=set_eom][value=true]) button"
1239
+ }
1240
+ ]
1241
+ },
1242
+ {
1243
+ "name": "google.com",
1244
+ "prehideSelectors": [
1245
+ ".HTjtHe#xe7COe"
1246
+ ],
1247
+ "detectCmp": [
1248
+ {
1249
+ "exists": ".HTjtHe#xe7COe"
1250
+ },
1251
+ {
1252
+ "exists": ".HTjtHe#xe7COe a[href^=\"https://policies.google.com/technologies/cookies\"]"
1253
+ }
1254
+ ],
1255
+ "detectPopup": [
1256
+ {
1257
+ "visible": ".HTjtHe#xe7COe button#W0wltc"
1258
+ }
1259
+ ],
1260
+ "optIn": [
1261
+ {
1262
+ "waitForThenClick": ".HTjtHe#xe7COe button#L2AGLb"
1263
+ }
1264
+ ],
1265
+ "optOut": [
1266
+ {
1267
+ "waitForThenClick": ".HTjtHe#xe7COe button#W0wltc"
1268
+ }
1269
+ ],
1270
+ "test": [
1271
+ {
1272
+ "eval": "!!document.cookie.match(/SOCS=CAE/)"
1273
+ }
1274
+ ]
1275
+ },
1070
1276
  {
1071
1277
  "name": "gov.uk",
1072
1278
  "detectCmp": [
@@ -1308,6 +1514,50 @@
1308
1514
  }
1309
1515
  ]
1310
1516
  },
1517
+ {
1518
+ "name": "linkedin.com",
1519
+ "prehideSelectors": [
1520
+ ".artdeco-global-alert[type=COOKIE_CONSENT]"
1521
+ ],
1522
+ "detectCmp": [
1523
+ {
1524
+ "exists": ".artdeco-global-alert[type=COOKIE_CONSENT]"
1525
+ }
1526
+ ],
1527
+ "detectPopup": [
1528
+ {
1529
+ "visible": ".artdeco-global-alert[type=COOKIE_CONSENT]"
1530
+ }
1531
+ ],
1532
+ "optIn": [
1533
+ {
1534
+ "waitForVisible": ".artdeco-global-alert[type=COOKIE_CONSENT] button[action-type=ACCEPT]"
1535
+ },
1536
+ {
1537
+ "wait": 500
1538
+ },
1539
+ {
1540
+ "waitForThenClick": ".artdeco-global-alert[type=COOKIE_CONSENT] button[action-type=ACCEPT]"
1541
+ }
1542
+ ],
1543
+ "optOut": [
1544
+ {
1545
+ "waitForVisible": ".artdeco-global-alert[type=COOKIE_CONSENT] button[action-type=DENY]"
1546
+ },
1547
+ {
1548
+ "wait": 500
1549
+ },
1550
+ {
1551
+ "waitForThenClick": ".artdeco-global-alert[type=COOKIE_CONSENT] button[action-type=DENY]"
1552
+ }
1553
+ ],
1554
+ "test": [
1555
+ {
1556
+ "waitForVisible": ".artdeco-global-alert[type=COOKIE_CONSENT]",
1557
+ "check": "none"
1558
+ }
1559
+ ]
1560
+ },
1311
1561
  {
1312
1562
  "name": "marksandspencer.com",
1313
1563
  "isHidingRule": true,
@@ -1512,11 +1762,6 @@
1512
1762
  {
1513
1763
  "click": ".js-decline-cookie-policy"
1514
1764
  }
1515
- ],
1516
- "test": [
1517
- {
1518
- "eval": "document.cookie.includes('_cookies_banner_dismissed=true') && !document.cookie.includes('_cookie_advertising_accepted')"
1519
- }
1520
1765
  ]
1521
1766
  },
1522
1767
  {
@@ -1552,7 +1797,7 @@
1552
1797
  "waitForVisible": "#moove_gdpr_cookie_modal"
1553
1798
  },
1554
1799
  {
1555
- "eval": "document.querySelectorAll('#moove_gdpr_cookie_modal input').forEach(i => { if (!i.disabled) i.checked = false }) || true"
1800
+ "eval": "document.querySelectorAll('#moove_gdpr_cookie_modal input').forEach(i => { if (!i.disabled && i.name !== 'moove_gdpr_strict_cookies') i.checked = false }) || true"
1556
1801
  },
1557
1802
  {
1558
1803
  "click": ".moove-gdpr-modal-save-settings"
@@ -1869,6 +2114,110 @@
1869
2114
  }
1870
2115
  ]
1871
2116
  },
2117
+ {
2118
+ "name": "privacymanager.io",
2119
+ "prehideSelectors": [
2120
+ "#gdpr-consent-tool-wrapper",
2121
+ "iframe[src^=\"https://cmp-consent-tool.privacymanager.io\"]"
2122
+ ],
2123
+ "runContext": {
2124
+ "urlPattern": "^https://cmp-consent-tool\\.privacymanager\\.io/",
2125
+ "main": false,
2126
+ "frame": true
2127
+ },
2128
+ "detectCmp": [
2129
+ {
2130
+ "exists": "button#save"
2131
+ }
2132
+ ],
2133
+ "detectPopup": [
2134
+ {
2135
+ "visible": "button#save"
2136
+ }
2137
+ ],
2138
+ "optIn": [
2139
+ {
2140
+ "click": "button#save"
2141
+ }
2142
+ ],
2143
+ "optOut": [
2144
+ {
2145
+ "if": {
2146
+ "exists": "#denyAll"
2147
+ },
2148
+ "then": [
2149
+ {
2150
+ "click": "#denyAll"
2151
+ },
2152
+ {
2153
+ "waitForThenClick": ".okButton"
2154
+ }
2155
+ ],
2156
+ "else": [
2157
+ {
2158
+ "waitForThenClick": "#manageSettings"
2159
+ },
2160
+ {
2161
+ "waitFor": ".purposes-overview-list"
2162
+ },
2163
+ {
2164
+ "waitFor": "button#saveAndExit"
2165
+ },
2166
+ {
2167
+ "click": "span[role=checkbox][aria-checked=true]",
2168
+ "all": true,
2169
+ "optional": true
2170
+ },
2171
+ {
2172
+ "click": "button#saveAndExit"
2173
+ }
2174
+ ]
2175
+ }
2176
+ ]
2177
+ },
2178
+ {
2179
+ "name": "pubtech",
2180
+ "prehideSelectors": [
2181
+ "#pubtech-cmp"
2182
+ ],
2183
+ "detectCmp": [
2184
+ {
2185
+ "exists": "#pubtech-cmp"
2186
+ }
2187
+ ],
2188
+ "detectPopup": [
2189
+ {
2190
+ "visible": "#pubtech-cmp #pt-actions"
2191
+ }
2192
+ ],
2193
+ "optIn": [
2194
+ {
2195
+ "if": {
2196
+ "exists": "#pt-accept-all"
2197
+ },
2198
+ "then": [
2199
+ {
2200
+ "click": "#pubtech-cmp #pt-actions #pt-accept-all"
2201
+ }
2202
+ ],
2203
+ "else": [
2204
+ {
2205
+ "click": "#pubtech-cmp #pt-actions button:nth-of-type(2)"
2206
+ }
2207
+ ]
2208
+ }
2209
+ ],
2210
+ "optOut": [
2211
+ {
2212
+ "click": "#pubtech-cmp #pt-close"
2213
+ }
2214
+ ],
2215
+ "test": [
2216
+ {
2217
+ "eval": "document.cookie.includes('euconsent-v2') && (document.cookie.match(/.YAAAAAAAAAAA/) || document.cookie.match(/.aAAAAAAAAAAA/) || document.cookie.match(/.YAAACFgAAAAA/)) "
2218
+ }
2219
+ ]
2220
+ },
1872
2221
  {
1873
2222
  "name": "quantcast",
1874
2223
  "prehideSelectors": [
@@ -1911,6 +2260,97 @@
1911
2260
  }
1912
2261
  ]
1913
2262
  },
2263
+ {
2264
+ "name": "reddit.com",
2265
+ "runContext": {
2266
+ "urlPattern": "^https://www\\.reddit\\.com/"
2267
+ },
2268
+ "prehideSelectors": [
2269
+ "section:has(section > span > a[href^=\"https://www.reddit.com/policies/cookies\"])"
2270
+ ],
2271
+ "detectCmp": [
2272
+ {
2273
+ "exists": "section:has(> span > a[href^=\"https://www.reddit.com/policies/cookies\"])"
2274
+ }
2275
+ ],
2276
+ "detectPopup": [
2277
+ {
2278
+ "visible": "section:has(> span > a[href^=\"https://www.reddit.com/policies/cookies\"])"
2279
+ }
2280
+ ],
2281
+ "optIn": [
2282
+ {
2283
+ "waitForThenClick": "section:has(> span > a[href^=\"https://www.reddit.com/policies/cookies\"]) section form:last-child button"
2284
+ }
2285
+ ],
2286
+ "optOut": [
2287
+ {
2288
+ "waitForThenClick": "section:has(> span > a[href^=\"https://www.reddit.com/policies/cookies\"]) section form:first-child button"
2289
+ }
2290
+ ],
2291
+ "test": [
2292
+ {
2293
+ "eval": "document.cookie.includes('eu_cookie={%22opted%22:true%2C%22nonessential%22:false}')"
2294
+ }
2295
+ ]
2296
+ },
2297
+ {
2298
+ "name": "sibbo",
2299
+ "prehideSelectors": [
2300
+ "sibbo-cmp-layout"
2301
+ ],
2302
+ "detectCmp": [
2303
+ {
2304
+ "exists": "sibbo-cmp-layout"
2305
+ }
2306
+ ],
2307
+ "detectPopup": [
2308
+ {
2309
+ "visible": "sibbo-cmp-layout"
2310
+ }
2311
+ ],
2312
+ "optIn": [
2313
+ {
2314
+ "click": "sibbo-cmp-layout [data-accept-all]"
2315
+ }
2316
+ ],
2317
+ "optOut": [
2318
+ {
2319
+ "click": ".sibbo-panel__aside__buttons a[data-nav=\"purposes\"]"
2320
+ },
2321
+ {
2322
+ "click": ".sibbo-panel__main__header__actions a[data-focusable=\"reject-all\"]"
2323
+ },
2324
+ {
2325
+ "if": {
2326
+ "exists": "[data-view=purposes] .sibbo-panel__main__footer__actions [data-save-and-exit]"
2327
+ },
2328
+ "then": [],
2329
+ "else": [
2330
+ {
2331
+ "waitFor": ".sibbo-panel__main__footer__actions a[data-focusable=\"next\"]:not(.sibbo-cmp-button--disabled)"
2332
+ },
2333
+ {
2334
+ "click": ".sibbo-panel__main__footer__actions a[data-focusable=\"next\"]"
2335
+ },
2336
+ {
2337
+ "click": ".sibbo-panel__main div[data-view=\"purposesLegInt\"] a[data-focusable=\"reject-all\"]"
2338
+ }
2339
+ ]
2340
+ },
2341
+ {
2342
+ "waitFor": ".sibbo-panel__main__footer__actions [data-save-and-exit]:not(.sibbo-cmp-button--disabled)"
2343
+ },
2344
+ {
2345
+ "click": ".sibbo-panel__main__footer__actions [data-save-and-exit]:not(.sibbo-cmp-button--disabled)"
2346
+ }
2347
+ ],
2348
+ "test": [
2349
+ {
2350
+ "eval": "!!window.localStorage.getItem('euconsent-v2')"
2351
+ }
2352
+ ]
2353
+ },
1914
2354
  {
1915
2355
  "name": "Sirdata",
1916
2356
  "prehideSelectors": [
@@ -2232,6 +2672,40 @@
2232
2672
  }
2233
2673
  ]
2234
2674
  },
2675
+ {
2676
+ "name": "twitter",
2677
+ "runContext": {
2678
+ "urlPattern": "^https://([a-z0-9-]+\\.)?twitter\\.com/"
2679
+ },
2680
+ "prehideSelectors": [
2681
+ "[data-testid=\"BottomBar\"]"
2682
+ ],
2683
+ "detectCmp": [
2684
+ {
2685
+ "exists": "[data-testid=\"BottomBar\"] div"
2686
+ }
2687
+ ],
2688
+ "detectPopup": [
2689
+ {
2690
+ "visible": "[data-testid=\"BottomBar\"] div"
2691
+ }
2692
+ ],
2693
+ "optIn": [
2694
+ {
2695
+ "waitForThenClick": "[data-testid=\"BottomBar\"] > div:has(>div:first-child>div:last-child>span[role=button]) > div:last-child > div[role=button]:first-child"
2696
+ }
2697
+ ],
2698
+ "optOut": [
2699
+ {
2700
+ "waitForThenClick": "[data-testid=\"BottomBar\"] > div:has(>div:first-child>div:last-child>span[role=button]) > div:last-child > div[role=button]:last-child"
2701
+ }
2702
+ ],
2703
+ "TODOtest": [
2704
+ {
2705
+ "eval": "document.cookie.includes('d_prefs=MjoxLGNvbnNlbnRfdmVyc2lvbjoy')"
2706
+ }
2707
+ ]
2708
+ },
2235
2709
  {
2236
2710
  "name": "UK Cookie Consent",
2237
2711
  "prehideSelectors": [
@@ -2359,7 +2833,7 @@
2359
2833
  {
2360
2834
  "name": "vodafone.de",
2361
2835
  "runContext": {
2362
- "url": "https://www.vodafone.de/"
2836
+ "urlPattern": "^https://www\\.vodafone\\.de/"
2363
2837
  },
2364
2838
  "prehideSelectors": [
2365
2839
  ".dip-consent,.dip-consent-container"
@@ -2512,6 +2986,90 @@
2512
2986
  "eval": "document.cookie.includes('userConsent=%7B%22marketing%22%3Afalse')"
2513
2987
  }
2514
2988
  ]
2989
+ },
2990
+ {
2991
+ "name": "youtube-desktop",
2992
+ "prehideSelectors": [
2993
+ "tp-yt-iron-overlay-backdrop.opened",
2994
+ "ytd-consent-bump-v2-lightbox"
2995
+ ],
2996
+ "detectCmp": [
2997
+ {
2998
+ "exists": "ytd-consent-bump-v2-lightbox tp-yt-paper-dialog"
2999
+ },
3000
+ {
3001
+ "exists": "ytd-consent-bump-v2-lightbox tp-yt-paper-dialog a[href^=\"https://consent.youtube.com/\"]"
3002
+ }
3003
+ ],
3004
+ "detectPopup": [
3005
+ {
3006
+ "visible": "ytd-consent-bump-v2-lightbox tp-yt-paper-dialog"
3007
+ }
3008
+ ],
3009
+ "optIn": [
3010
+ {
3011
+ "waitForThenClick": "ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:last-child #button,ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:last-child button"
3012
+ },
3013
+ {
3014
+ "wait": 500
3015
+ }
3016
+ ],
3017
+ "optOut": [
3018
+ {
3019
+ "waitForThenClick": "ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:first-child #button,ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:first-child button"
3020
+ },
3021
+ {
3022
+ "wait": 500
3023
+ }
3024
+ ],
3025
+ "test": [
3026
+ {
3027
+ "wait": 500
3028
+ },
3029
+ {
3030
+ "eval": "!!document.cookie.match(/SOCS=CAE/)"
3031
+ }
3032
+ ]
3033
+ },
3034
+ {
3035
+ "name": "youtube-mobile",
3036
+ "prehideSelectors": [
3037
+ ".consent-bump-v2-lightbox"
3038
+ ],
3039
+ "detectCmp": [
3040
+ {
3041
+ "exists": "ytm-consent-bump-v2-renderer"
3042
+ }
3043
+ ],
3044
+ "detectPopup": [
3045
+ {
3046
+ "visible": "ytm-consent-bump-v2-renderer"
3047
+ }
3048
+ ],
3049
+ "optIn": [
3050
+ {
3051
+ "waitForThenClick": "ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons c3-material-button:first-child button, ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons ytm-button-renderer:first-child button"
3052
+ },
3053
+ {
3054
+ "wait": 500
3055
+ }
3056
+ ],
3057
+ "optOut": [
3058
+ {
3059
+ "waitForThenClick": "ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons c3-material-button:nth-child(2) button, ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons ytm-button-renderer:nth-child(2) button"
3060
+ },
3061
+ {
3062
+ "wait": 500
3063
+ }
3064
+ ],
3065
+ "test": [
3066
+ {
3067
+ "wait": 500
3068
+ },
3069
+ {
3070
+ "eval": "!!document.cookie.match(/SOCS=CAE/)"
3071
+ }
3072
+ ]
2515
3073
  }
2516
3074
  ],
2517
3075
  "consentomatic": {
@@ -1 +1 @@
1
- !function(){"use strict";const e=chrome.runtime.getManifest().manifest_version,t={enabled:!0,autoAction:"optOut",disabledCmps:[],enablePrehide:!0,detectRetries:20},o={};async function s(t){if(2!==e)return chrome.storage.local.set(t);Object.assign(o,t)}async function c(t){return 2===e?o:chrome.storage.local.get(t)}async function n(){const e=await fetch("./rules.json");s({rules:await e.json()})}function r(e,t,o=""){let s="",c="icons/cookie-idle.png";"success"===t?(s=`Opt out successful! (${o})`,c="icons/party.png"):"complete"===t?(s=`Opt out complete! (${o})`,c="icons/tick.png"):"working"===t?(s=`Processing... (${o})`,c="icons/cog.png"):"verified"===t?(s=`Verified (${o})`,c="icons/verified.png"):"idle"===t?(s="Idle",c="icons/cookie-idle.png"):"available"===t&&(s=`Click to opt out (${o})`,c="icons/cookie.png");const n=chrome.action||chrome.pageAction;chrome.pageAction&&chrome.pageAction.show(e),n.setTitle({tabId:e,title:s}),n.setIcon({tabId:e,path:c})}chrome.runtime.onInstalled.addListener((()=>{n()})),2===e&&n(),chrome.runtime.onMessage.addListener((async(n,a)=>{const i=a.tab.id,l=a.frameId,d=(await c("rules")).rules;switch(n.type){case"init":0===l&&r(i,"idle"),chrome.tabs.sendMessage(i,{type:"initResp",rules:d,config:t},{frameId:l});break;case"eval":(async function(t,o,s){return 2===e?new Promise((e=>{chrome.tabs.executeScript(t,{frameId:o,code:`!!window.eval(decodeURIComponent("${encodeURIComponent(s)}"))`},(t=>{e([{result:t,frameId:o}])}))})):chrome.scripting.executeScript({target:{tabId:t,frameIds:[o]},world:"MAIN",args:[s],func:e=>{try{return window.eval(e)}catch(t){return void console.warn("eval error",e,t)}}})})(i,l,n.code).then((([e])=>{chrome.tabs.sendMessage(i,{id:n.id,type:"evalResp",result:e.result},{frameId:l})}));break;case"popupFound":r(i,"available",n.cmp),s({[`detected${i}`]:l});break;case"optOutResult":case"optInResult":n.result&&(r(i,"working",n.cmp),n.scheduleSelfTest&&await s({[`selfTest${i}`]:l}));break;case"selfTestResult":n.result&&r(i,"verified",n.cmp);break;case"autoconsentDone":{r(i,"success",n.cmp);const t=`selfTest${i}`,s=(await chrome.storage.local.get(t))?.[t];"number"==typeof s&&(!async function(t){if(2!==e)return chrome.storage.local.remove(t);delete o[t]}(t),chrome.tabs.sendMessage(i,{type:"selfTest"},{frameId:s}));break}case"autoconsentError":console.error("Error:",n.details)}})),(chrome.action||chrome.pageAction).onClicked.addListener((async e=>{const t=e.id,o=`detected${t}`,s=(await c(o))?.[o];"number"==typeof s&&(chrome.storage.local.remove(o),r(t,"working"),chrome.tabs.sendMessage(t,{type:"optOut"},{frameId:s}))}))}();
1
+ !function(){"use strict";const e=chrome.runtime.getManifest().manifest_version,t={};async function o(o){if(2!==e)return chrome.storage.local.set(o);Object.assign(t,o)}async function a(o){return null===o?2===e?t:await chrome.storage.local.get(null):2===e?t[o]:(await chrome.storage.local.get(o))?.[o]}async function s(o){if(2!==e)return chrome.storage.local.remove(o);delete t[o]}async function n(e,t,o=""){let a="",s="icons/cookie-idle.png";"success"===t?(a=`Opt out successful! (${o})`,s="icons/party.png"):"complete"===t?(a=`Opt out complete! (${o})`,s="icons/tick.png"):"working"===t?(a=`Processing... (${o})`,s="icons/cog.png"):"verified"===t?(a=`Verified (${o})`,s="icons/verified.png"):"idle"===t?(a="Idle",s="icons/cookie-idle.png"):"available"===t&&(a=`Click to opt out (${o})`,s="icons/cookie.png");const n=chrome.action||chrome.pageAction;chrome.pageAction&&chrome.pageAction.show(e),await n.setTitle({tabId:e,title:a}),await n.setIcon({tabId:e,path:s})}async function c(){const e=await fetch("./rules.json");o({rules:await e.json()})}async function i(){console.log("init sw");const e=await a("config");if(console.log("storedConfig",e),!e){console.log("init config");const e={enabled:!0,autoAction:"optOut",disabledCmps:[],enablePrehide:!0,detectRetries:20};await o({config:e})}}chrome.runtime.onInstalled.addListener((()=>{c(),i()})),2===e&&(c(),i()),chrome.tabs.onRemoved.addListener((e=>{s(`detected${e}`)})),chrome.runtime.onMessage.addListener((async(t,c)=>{const i=c.tab.id,r=c.frameId,l=await a("rules"),d=await a("config");switch(t.type){case"init":0===r&&await n(i,"idle"),chrome.tabs.sendMessage(i,{type:"initResp",rules:l,config:d},{frameId:r});break;case"eval":(async function(t,o,a){return 2===e?new Promise((e=>{chrome.tabs.executeScript(t,{frameId:o,code:`!!window.eval(decodeURIComponent("${encodeURIComponent(a)}"))`},(t=>{e([{result:t,frameId:o}])}))})):chrome.scripting.executeScript({target:{tabId:t,frameIds:[o]},world:"MAIN",args:[a],func:e=>{try{return window.eval(e)}catch(t){return void console.warn("eval error",e,t)}}})})(i,r,t.code).then((([e])=>{chrome.tabs.sendMessage(i,{id:t.id,type:"evalResp",result:e.result},{frameId:r})}));break;case"popupFound":await n(i,"available",t.cmp),o({[`detected${i}`]:r});break;case"optOutResult":case"optInResult":t.result&&(await n(i,"working",t.cmp),t.scheduleSelfTest&&await o({[`selfTest${i}`]:r}));break;case"selfTestResult":t.result&&await n(i,"verified",t.cmp);break;case"autoconsentDone":{await n(i,"success",t.cmp);const e=`selfTest${i}`,o=(await chrome.storage.local.get(e))?.[e];"number"==typeof o&&(s(e),chrome.tabs.sendMessage(i,{type:"selfTest"},{frameId:o}));break}case"autoconsentError":console.error("Error:",t.details)}})),2===e&&chrome.pageAction.onClicked.addListener((async e=>{const t=e.id,o=`detected${t}`,c=await a(o);"number"==typeof c&&(s(o),await n(t,"working"),chrome.tabs.sendMessage(t,{type:"optOut"},{frameId:c}))}))}();