@duckduckgo/autoconsent 16.16.0 → 16.18.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 (45) hide show
  1. package/.agents/skills/proxy-testing/SKILL.md +17 -3
  2. package/.agents/skills/proxy-testing/scripts/regional-proxy.mjs +10 -3
  3. package/AGENTS.md +5 -4
  4. package/CHANGELOG.md +35 -0
  5. package/dist/addon-firefox/compact-rules.json +1 -1
  6. package/dist/addon-firefox/content.bundle.js +0 -90
  7. package/dist/addon-firefox/manifest.json +1 -1
  8. package/dist/addon-firefox/rule-index.json +1 -1
  9. package/dist/addon-firefox/rules.json +1 -1
  10. package/dist/addon-mv3/compact-rules.json +1 -1
  11. package/dist/addon-mv3/content.bundle.js +0 -90
  12. package/dist/addon-mv3/manifest.json +1 -1
  13. package/dist/addon-mv3/rule-index.json +1 -1
  14. package/dist/addon-mv3/rules.json +1 -1
  15. package/dist/autoconsent.cjs.js +0 -90
  16. package/dist/autoconsent.esm.js +0 -90
  17. package/dist/autoconsent.playwright.js +0 -90
  18. package/dist/autoconsent.standalone.js +1 -91
  19. package/lib/cmps/all.ts +0 -2
  20. package/package.json +1 -1
  21. package/rules/autoconsent/borlabs.json +48 -17
  22. package/rules/autoconsent/pornhub.json +27 -3
  23. package/rules/autoconsent/samsung-com.json +1 -1
  24. package/rules/autoconsent/theguardian.com.json +21 -0
  25. package/rules/autoconsent/youtube-mobile.json +1 -0
  26. package/rules/compact-rules.json +1 -1
  27. package/rules/rule-index.json +1 -1
  28. package/rules/rules.json +1 -1
  29. package/tests/borlabs.spec.ts +1 -1
  30. package/tests/onetrust.spec.ts +4 -0
  31. package/tests/pornhub.spec.ts +2 -1
  32. package/tests/sourcepoint.spec.ts +7 -6
  33. package/tests/theguardian.com.spec.ts +11 -0
  34. package/tests/trustarc-newcm.spec.ts +1 -1
  35. package/tests/trustarc.spec.ts +0 -7
  36. package/tests-wtr/rules/cmp-test-urls.json +0 -1
  37. package/dist/types/cmps/trustarc-frame.d.ts +0 -15
  38. package/lib/cmps/trustarc-frame.ts +0 -126
  39. package/rules/autoconsent/complianz-opt-both.json +0 -12
  40. package/rules/autoconsent/deepl.json +0 -14
  41. package/rules/autoconsent/jdsports.json +0 -41
  42. package/rules/autoconsent/pornhub-compact-cookie-banner.json +0 -28
  43. package/tests/complianz-opt-both.spec.ts +0 -3
  44. package/tests/deepl.spec.ts +0 -5
  45. package/tests/jdsports.spec.ts +0 -3
package/lib/cmps/all.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import TrustArcTop from './trustarc-top';
2
- import TrustArcFrame from './trustarc-frame';
3
2
  import CookieBot from './cookiebot';
4
3
  import SourcePointFrame from './sourcepoint-frame';
5
4
  import ConsentManager from './consentmanager';
@@ -14,7 +13,6 @@ import Admiral from './admiral';
14
13
 
15
14
  export const dynamicCMPs = [
16
15
  TrustArcTop,
17
- TrustArcFrame,
18
16
  CookieBot,
19
17
  SourcePointFrame,
20
18
  ConsentManager,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckduckgo/autoconsent",
3
- "version": "16.16.0",
3
+ "version": "16.18.0",
4
4
  "description": "",
5
5
  "types": "./dist/types/web.d.ts",
6
6
  "exports": {
@@ -18,25 +18,56 @@
18
18
  ],
19
19
  "optOut": [
20
20
  {
21
- "if": { "exists": ".brlbs-btn-accept-only-essential,a[data-cookie-refuse]" },
22
- "then": [{ "click": ".brlbs-btn-accept-only-essential,a[data-cookie-refuse]" }],
23
- "else": [
24
- {
25
- "click": "a[data-cookie-individual]"
26
- },
27
- {
28
- "waitForVisible": ".cookie-preference"
29
- },
21
+ "if": {
22
+ "exists": ".brlbs-btn-accept-only-essential,a[data-cookie-refuse]"
23
+ },
24
+ "then": [
30
25
  {
31
- "click": "input[data-borlabs-cookie-checkbox]:checked",
32
- "all": true,
33
- "optional": true
34
- },
35
- {
36
- "click": "#CookiePrefSave"
37
- },
26
+ "click": ".brlbs-btn-accept-only-essential,a[data-cookie-refuse]"
27
+ }
28
+ ],
29
+ "else": [
38
30
  {
39
- "wait": 500
31
+ "if": { "exists": ".brlbs-btn-save,#CookieBoxSaveButton" },
32
+ "then": [
33
+ {
34
+ "click": ".brlbs-btn-save,#CookieBoxSaveButton"
35
+ }
36
+ ],
37
+ "else": [
38
+ {
39
+ "if": { "exists": ".brlbs-cmpnt-close-button[data-borlabs-cookie-actions=\"close-button\"]" },
40
+ "then": [
41
+ {
42
+ "click": ".brlbs-cmpnt-close-button[data-borlabs-cookie-actions=\"close-button\"]"
43
+ }
44
+ ],
45
+ "else": [
46
+ {
47
+ "if": { "exists": "a[data-cookie-individual]" },
48
+ "then": [
49
+ {
50
+ "click": "a[data-cookie-individual]"
51
+ },
52
+ {
53
+ "waitForVisible": ".cookie-preference"
54
+ },
55
+ {
56
+ "click": "input[data-borlabs-cookie-checkbox]:checked",
57
+ "all": true,
58
+ "optional": true
59
+ },
60
+ {
61
+ "click": "#CookiePrefSave"
62
+ },
63
+ {
64
+ "wait": 500
65
+ }
66
+ ]
67
+ }
68
+ ]
69
+ }
70
+ ]
40
71
  }
41
72
  ]
42
73
  }
@@ -4,15 +4,17 @@
4
4
  "urlPattern": "^https://(www\\.)?pornhub\\.com/"
5
5
  },
6
6
  "cosmetic": false,
7
- "prehideSelectors": ["#cookieBanner #cookieBannerContent"],
7
+ "prehideSelectors": ["#cookieBanner #cookieBannerContent", "#cookieBanner.cbShort"],
8
8
  "detectCmp": [
9
9
  {
10
- "exists": "#cookieBanner #cookieBannerContent, #globalCookieBanner"
10
+ "visible": "#cookieBanner #cookieBannerContent, #globalCookieBanner, #cookieBanner.cbShort",
11
+ "check": "any"
11
12
  }
12
13
  ],
13
14
  "detectPopup": [
14
15
  {
15
- "visible": "#cookieBanner #cookieBannerContent, #globalCookieBanner"
16
+ "visible": "#cookieBanner #cookieBannerContent, #globalCookieBanner, #cookieBanner.cbShort .cbCloseButton",
17
+ "check": "any"
16
18
  }
17
19
  ],
18
20
  "optIn": [
@@ -21,6 +23,16 @@
21
23
  }
22
24
  ],
23
25
  "optOut": [
26
+ {
27
+ "if": {
28
+ "visible": "#cookieBanner.cbShort .cbCloseButton"
29
+ },
30
+ "then": [
31
+ {
32
+ "waitForThenClick": "#cookieBanner.cbShort .cbCloseButton"
33
+ }
34
+ ]
35
+ },
24
36
  {
25
37
  "if": {
26
38
  "exists": "#globalCookieBanner .js-customizeGlobalCookies"
@@ -46,5 +58,17 @@
46
58
  }
47
59
  ]
48
60
  }
61
+ ],
62
+ "test": [
63
+ {
64
+ "any": [
65
+ {
66
+ "cookieContains": "cookieConsent=2"
67
+ },
68
+ {
69
+ "cookieContains": "cookieBannerState"
70
+ }
71
+ ]
72
+ }
49
73
  ]
50
74
  }
@@ -7,6 +7,6 @@
7
7
  "prehideSelectors": ["div.cookie-bar"],
8
8
  "detectCmp": [{ "exists": "div.cookie-bar" }],
9
9
  "detectPopup": [{ "visible": "div.cookie-bar" }],
10
- "optIn": [{ "click": "div.cookie-bar__manage > a" }],
10
+ "optIn": [{ "hide": "div.cookie-bar" }],
11
11
  "optOut": [{ "hide": "div.cookie-bar" }]
12
12
  }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "theguardian.com",
3
+ "vendorUrl": "https://www.theguardian.com/",
4
+ "comment": "Sourcepoint 'consent or pay' wall shown in the EU/EEA (message 1482251) and UK (message 1482252), where the only reject option requires a paid subscription. The container id embeds the Sourcepoint message id, so we target the pay-wall variants specifically to avoid clashing with the free-reject Sourcepoint popup used in other regions (handled by Sourcepoint-frame). Brittle: message ids may change if the campaign is reconfigured.",
5
+ "cosmetic": true,
6
+ "minimumRuleStepVersion": 2,
7
+ "runContext": {
8
+ "urlPattern": "^https?://(\\w+\\.)?theguardian\\.com/",
9
+ "main": true,
10
+ "frame": false
11
+ },
12
+ "prehideSelectors": ["div[id='sp_message_container_1482251'],div[id='sp_message_container_1482252']"],
13
+ "detectCmp": [{ "exists": "div[id='sp_message_container_1482251'],div[id='sp_message_container_1482252']" }],
14
+ "detectPopup": [{ "visible": "div[id='sp_message_container_1482251'],div[id='sp_message_container_1482252']" }],
15
+ "optIn": [],
16
+ "optOut": [
17
+ { "hide": "div[id='sp_message_container_1482251'],div[id='sp_message_container_1482252']" },
18
+ { "removeClass": "sp-message-open", "selector": "html", "optional": true }
19
+ ],
20
+ "test": [{ "visible": "div[id='sp_message_container_1482251'],div[id='sp_message_container_1482252']", "check": "none" }]
21
+ }
@@ -10,6 +10,7 @@
10
10
  { "wait": 500 }
11
11
  ],
12
12
  "optOut": [
13
+ { "wait": 500 },
13
14
  {
14
15
  "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"
15
16
  },