@duckduckgo/autoconsent 9.6.0 → 9.7.1

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 (69) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/addon-firefox/background.bundle.js +7 -0
  3. package/dist/addon-firefox/content.bundle.js +7 -0
  4. package/dist/addon-firefox/manifest.json +1 -1
  5. package/dist/addon-firefox/rules.json +897 -4
  6. package/dist/addon-mv3/background.bundle.js +7 -0
  7. package/dist/addon-mv3/content.bundle.js +7 -0
  8. package/dist/addon-mv3/manifest.json +1 -1
  9. package/dist/addon-mv3/rules.json +897 -4
  10. package/dist/autoconsent.cjs.js +7 -0
  11. package/dist/autoconsent.esm.js +7 -0
  12. package/dist/autoconsent.playwright.js +1 -1
  13. package/dist/autoconsent.unit.js +904 -4
  14. package/lib/eval-snippets.ts +7 -0
  15. package/package.json +1 -1
  16. package/rules/autoconsent/abconcerts.be.json +39 -0
  17. package/rules/autoconsent/aliexpress.json +39 -0
  18. package/rules/autoconsent/arbeitsagentur.json +36 -0
  19. package/rules/autoconsent/asus.json +43 -0
  20. package/rules/autoconsent/cookieacceptbar.json +26 -0
  21. package/rules/autoconsent/cookieconsent2.json +32 -0
  22. package/rules/autoconsent/cookieconsent3.json +29 -0
  23. package/rules/autoconsent/dndbeyond.json +31 -0
  24. package/rules/autoconsent/hashicorp.json +31 -0
  25. package/rules/autoconsent/hu-manity.json +28 -0
  26. package/rules/autoconsent/jdsports.json +39 -0
  27. package/rules/autoconsent/lineagrafica.json +26 -0
  28. package/rules/autoconsent/livejasmin.json +39 -0
  29. package/rules/autoconsent/om.json +40 -0
  30. package/rules/autoconsent/openli.json +26 -0
  31. package/rules/autoconsent/ourworldindata.json +28 -0
  32. package/rules/autoconsent/pabcogypsum.json +25 -0
  33. package/rules/autoconsent/productz.com.json +28 -0
  34. package/rules/autoconsent/setapp.com.json +29 -0
  35. package/rules/autoconsent/svt.se.json +31 -0
  36. package/rules/autoconsent/taunton.json +36 -0
  37. package/rules/autoconsent/termsfeed.json +26 -0
  38. package/rules/autoconsent/termsfeed3.json +27 -0
  39. package/rules/autoconsent/twitch-mobile.json +29 -0
  40. package/rules/autoconsent/wolframalpha.json +29 -0
  41. package/rules/autoconsent/xe.com.json +39 -0
  42. package/rules/create-rule.mjs +2 -2
  43. package/rules/rules.json +897 -4
  44. package/tests/abconcerts.be.spec.ts +7 -0
  45. package/tests/aliexpress.spec.ts +6 -0
  46. package/tests/arbeitsagentur.spec.ts +5 -0
  47. package/tests/asus.spec.ts +6 -0
  48. package/tests/cookieacceptbar.spec.ts +6 -0
  49. package/tests/cookieconsent2.spec.ts +7 -0
  50. package/tests/cookieconsent3.spec.ts +5 -0
  51. package/tests/dndbeyond.spec.ts +5 -0
  52. package/tests/hashicorp.spec.ts +5 -0
  53. package/tests/hu-manity.spec.ts +7 -0
  54. package/tests/jdsports.spec.ts +5 -0
  55. package/tests/lineagrafica.spec.ts +5 -0
  56. package/tests/livejasmin.spec.ts +5 -0
  57. package/tests/om.spec.ts +9 -0
  58. package/tests/openli.spec.ts +6 -0
  59. package/tests/ourworldindata.spec.ts +5 -0
  60. package/tests/pabcogypsum.spec.ts +5 -0
  61. package/tests/productz.com.spec.ts +5 -0
  62. package/tests/setapp.com.spec.ts +5 -0
  63. package/tests/svt.se.spec.ts +5 -0
  64. package/tests/taunton.spec.ts +11 -0
  65. package/tests/termsfeed.spec.ts +6 -0
  66. package/tests/termsfeed3.spec.ts +7 -0
  67. package/tests/twitch-mobile.spec.ts +5 -0
  68. package/tests/wolframalpha.spec.ts +5 -0
  69. package/tests/xe.com.spec.ts +5 -0
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "setapp.com",
3
+ "vendorUrl": "https://setapp.com/",
4
+ "cosmetic": true,
5
+ "runContext": {
6
+ "urlPattern": "^https://setapp\\.com/"
7
+ },
8
+ "prehideSelectors": [],
9
+ "detectCmp": [
10
+ {
11
+ "exists": ".cookie-banner.js-cookie-banner"
12
+ }
13
+ ],
14
+ "detectPopup": [
15
+ {
16
+ "visible": ".cookie-banner.js-cookie-banner"
17
+ }
18
+ ],
19
+ "optIn": [
20
+ {
21
+ "waitForThenClick": ".cookie-banner.js-cookie-banner button"
22
+ }
23
+ ],
24
+ "optOut": [
25
+ {
26
+ "hide": ".cookie-banner.js-cookie-banner"
27
+ }
28
+ ]
29
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "svt.se",
3
+ "vendorUrl": "https://www.svt.se/",
4
+ "runContext": {
5
+ "urlPattern": "^https://www\\.svt\\.se/"
6
+ },
7
+ "prehideSelectors": ["[class*=CookieConsent__root___]"],
8
+ "detectCmp": [
9
+ {
10
+ "exists": "[class*=CookieConsent__root___]"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": "[class*=CookieConsent__modal___]"
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": "[class*=CookieConsent__modal___] > div > button[class*=primary]"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "waitForThenClick": "[class*=CookieConsent__modal___] > div > button[class*=secondary]:nth-child(2)"
26
+ }
27
+ ],
28
+ "test": [{
29
+ "eval": "EVAL_SVT_TEST"
30
+ }]
31
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "taunton",
3
+ "vendorUrl": "https://www.taunton.com/",
4
+ "prehideSelectors": ["#taunton-user-consent__overlay"],
5
+ "detectCmp": [
6
+ {
7
+ "exists": "#taunton-user-consent__overlay"
8
+ }
9
+ ],
10
+ "detectPopup": [
11
+ {
12
+ "exists": "#taunton-user-consent__overlay:not([aria-hidden=true])"
13
+ }
14
+ ],
15
+ "optIn": [
16
+ {
17
+ "click": "#taunton-user-consent__toolbar input[type=checkbox]:not(:checked)"
18
+ },
19
+ {
20
+ "click": "#taunton-user-consent__toolbar button[type=submit]"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "click": "#taunton-user-consent__toolbar input[type=checkbox]:checked",
26
+ "optional": true,
27
+ "all": true
28
+ },
29
+ {
30
+ "click": "#taunton-user-consent__toolbar button[type=submit]"
31
+ }
32
+ ],
33
+ "test": [{
34
+ "eval": "EVAL_TAUNTON_TEST"
35
+ }]
36
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "termsfeed",
3
+ "vendorUrl": "https://termsfeed.com",
4
+ "comment": "v4.x.x",
5
+ "prehideSelectors": [".termsfeed-com---nb"],
6
+ "detectCmp": [
7
+ {
8
+ "exists": ".termsfeed-com---nb"
9
+ }
10
+ ],
11
+ "detectPopup": [
12
+ {
13
+ "visible": ".termsfeed-com---nb"
14
+ }
15
+ ],
16
+ "optIn": [
17
+ {
18
+ "waitForThenClick": ".cc-nb-okagree"
19
+ }
20
+ ],
21
+ "optOut": [
22
+ {
23
+ "waitForThenClick": ".cc-nb-reject"
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "termsfeed3",
3
+ "vendorUrl": "https://termsfeed.com",
4
+ "comment": "v3.x.x",
5
+ "cosmetic": true,
6
+ "prehideSelectors": [".cc_dialog.cc_css_reboot"],
7
+ "detectCmp": [
8
+ {
9
+ "exists": ".cc_dialog.cc_css_reboot"
10
+ }
11
+ ],
12
+ "detectPopup": [
13
+ {
14
+ "visible": ".cc_dialog.cc_css_reboot"
15
+ }
16
+ ],
17
+ "optIn": [
18
+ {
19
+ "waitForThenClick": ".cc_dialog.cc_css_reboot .cc_b_ok"
20
+ }
21
+ ],
22
+ "optOut": [
23
+ {
24
+ "hide": ".cc_dialog.cc_css_reboot"
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "twitch-mobile",
3
+ "vendorUrl": "https://m.twitch.tv/",
4
+ "cosmetic": true,
5
+ "runContext": {
6
+ "urlPattern": "^https?:\/\/m\\.twitch\\.tv"
7
+ },
8
+ "prehideSelectors": [],
9
+ "detectCmp": [
10
+ {
11
+ "exists": ".ReactModal__Overlay [href=\"https://www.twitch.tv/p/cookie-policy\"]"
12
+ }
13
+ ],
14
+ "detectPopup": [
15
+ {
16
+ "visible": ".ReactModal__Overlay [href=\"https://www.twitch.tv/p/cookie-policy\"]"
17
+ }
18
+ ],
19
+ "optIn": [
20
+ {
21
+ "waitForThenClick": ".ReactModal__Overlay:has([href=\"https://www.twitch.tv/p/cookie-policy\"]) button"
22
+ }
23
+ ],
24
+ "optOut": [
25
+ {
26
+ "hide": ".ReactModal__Overlay:has([href=\"https://www.twitch.tv/p/cookie-policy\"])"
27
+ }
28
+ ]
29
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "wolframalpha",
3
+ "vendorUrl": "https://www.wolframalpha.com",
4
+ "prehideSelectors": [],
5
+ "cosmetic": true,
6
+ "runContext": {
7
+ "urlPattern": "^https://www\\.wolframalpha\\.com/"
8
+ },
9
+ "detectCmp": [
10
+ {
11
+ "exists": "section._a_yb"
12
+ }
13
+ ],
14
+ "detectPopup": [
15
+ {
16
+ "visible": "section._a_yb"
17
+ }
18
+ ],
19
+ "optIn": [
20
+ {
21
+ "waitForThenClick": "section._a_yb button"
22
+ }
23
+ ],
24
+ "optOut": [
25
+ {
26
+ "hide": "section._a_yb"
27
+ }
28
+ ]
29
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "xe.com",
3
+ "vendorUrl": "https://www.xe.com/",
4
+ "runContext": {
5
+ "urlPattern": "^https://www\\.xe\\.com/"
6
+ },
7
+ "prehideSelectors": ["[class*=ConsentBanner]"],
8
+ "detectCmp": [
9
+ {
10
+ "exists": "[class*=ConsentBanner]"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": "[class*=ConsentBanner]"
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": "[class*=ConsentBanner] .egnScw"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "wait": 1000
26
+ },
27
+ {
28
+ "waitForThenClick": "[class*=ConsentBanner] .frDWEu"
29
+ },
30
+ {
31
+ "waitForThenClick": "[class*=ConsentBanner] .hXIpFU"
32
+ }
33
+ ],
34
+ "test": [
35
+ {
36
+ "eval": "EVAL_XE_TEST"
37
+ }
38
+ ]
39
+ }
@@ -19,14 +19,14 @@ const prompt = (query) => new Promise((resolve) => rl.question(query, resolve));
19
19
  runContext: {
20
20
  main: true,
21
21
  frame: false,
22
+ urlPattern: '',
22
23
  },
23
- intermediate: false,
24
24
  prehideSelectors: [],
25
25
  detectCmp: [{ exists: '#TODO'}],
26
26
  detectPopup: [{ visible: '#TODO'}],
27
27
  optIn: [{ waitForThenClick: '#Accept'}],
28
28
  optOut: [{ waitForThenClick: '#Reject'}],
29
- test: []
29
+ test: [{ eval: "EVAL_TODO" }]
30
30
  }
31
31
  const ruleString = JSON.stringify(rule, undefined, 2)
32
32
  const testString = `import generateCMPTests from "../playwright/runner";