@duckduckgo/autoconsent 16.22.0 → 16.24.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckduckgo/autoconsent",
3
- "version": "16.22.0",
3
+ "version": "16.24.0",
4
4
  "description": "",
5
5
  "types": "./dist/types/web.d.ts",
6
6
  "exports": {
@@ -7,34 +7,33 @@
7
7
  "runContext": {
8
8
  "main": true,
9
9
  "frame": false,
10
- "urlPattern": "^https://(www\\.)?chatgpt\\.com/"
10
+ "urlPattern": "^https?://(\\w+\\.)?chatgpt\\.com/"
11
11
  },
12
- "prehideSelectors": [],
12
+ "comment": "Covers the server-rendered consent dialog. Once the app hydrates it swaps in a banner whose buttons are only distinguishable by text, which the heuristic rule handles better.",
13
+ "prehideSelectors": ["dialog[data-cookie-consent]:has(form[data-privacy-consent-form])"],
13
14
  "detectCmp": [
14
15
  {
15
- "exists": "body > div:not([id]) > div:nth-child(2):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > div:nth-child(2):not([id]) > button:nth-child(2):not([id])"
16
+ "exists": "dialog[data-cookie-consent] form[data-privacy-consent-form] input[name=\"action\"][value=\"reject\"]"
16
17
  }
17
18
  ],
18
19
  "detectPopup": [
19
20
  {
20
- "visible": "body > div:not([id]) > div:nth-child(2):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > div:nth-child(2):not([id]) > button:nth-child(2):not([id])"
21
+ "visible": "dialog[data-cookie-consent]:has(form[data-privacy-consent-form])"
21
22
  }
22
23
  ],
23
24
  "optIn": [
24
25
  {
25
- "waitForThenClick": "body > div:not([id]) > div:nth-child(2):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > div:nth-child(2):not([id]) > button:nth-child(3):not([id])"
26
+ "waitForThenClick": "dialog[data-cookie-consent] form[data-privacy-consent-form]:has(input[name=\"action\"][value=\"accept\"]) button[type=\"submit\"]"
26
27
  }
27
28
  ],
28
29
  "optOut": [
29
- { "wait": 500 },
30
30
  {
31
- "waitForThenClick": "body > div:not([id]) > div:nth-child(2):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > div:nth-child(2):not([id]) > button:nth-child(2):not([id])",
32
- "comment": "Reject non-essential"
31
+ "waitForThenClick": "dialog[data-cookie-consent] form[data-privacy-consent-form]:has(input[name=\"action\"][value=\"reject\"]) button[type=\"submit\"]"
33
32
  }
34
33
  ],
35
34
  "test": [
36
35
  {
37
- "waitForVisible": "body > div:not([id]) > div:nth-child(2):not([id]) > div:not([id]) > div:nth-child(2):not([id]) > div:nth-child(2):not([id]) > button:nth-child(2):not([id])",
36
+ "waitForVisible": "dialog[data-cookie-consent]",
38
37
  "timeout": 1000,
39
38
  "check": "none"
40
39
  }
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "check24",
3
+ "prehideSelectors": [".c24-cookie-consent-wrapper"],
4
+ "detectCmp": [
5
+ {
6
+ "exists": ".c24-cookie-consent-wrapper .c24-cookie-consent-functional"
7
+ }
8
+ ],
9
+ "detectPopup": [
10
+ {
11
+ "visible": ".c24-cookie-consent-notice"
12
+ }
13
+ ],
14
+ "optIn": [
15
+ {
16
+ "waitForThenClick": ".c24-cookie-consent-notice .c24-cookie-consent-button:not(.c24-cookie-consent-button-secondary)"
17
+ }
18
+ ],
19
+ "optOut": [
20
+ {
21
+ "waitForThenClick": ".c24-cookie-consent-wrapper .c24-cookie-consent-functional"
22
+ }
23
+ ],
24
+ "test": [
25
+ {
26
+ "visible": ".c24-cookie-consent-wrapper",
27
+ "check": "none"
28
+ }
29
+ ]
30
+ }
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "holidaymedia",
3
3
  "vendorUrl": "https://holidaymedia.nl/",
4
- "prehideSelectors": ["dialog[data-cookie-consent]"],
5
- "detectCmp": [{ "exists": "dialog[data-cookie-consent]" }],
6
- "detectPopup": [{ "visible": "dialog[data-cookie-consent]" }],
4
+ "prehideSelectors": ["dialog[data-cookie-consent]:has([data-cookie-accept])"],
5
+ "detectCmp": [{ "exists": "dialog[data-cookie-consent] [data-cookie-accept]" }],
6
+ "detectPopup": [{ "visible": "dialog[data-cookie-consent]:has([data-cookie-accept])" }],
7
7
  "optIn": [{ "waitForThenClick": "button.cookie-consent__button--accept-all" }],
8
8
  "optOut": [{ "waitForThenClick": "a[data-cookie-accept=\"functional\"]", "timeout": 2000 }]
9
9
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "paypal-us",
3
- "prehideSelectors": ["#ccpaCookieContent_wrapper, article.ppvx_modal--overpanel"],
4
- "detectCmp": [{ "exists": "#ccpaCookieBanner, .privacy-sheet-content" }],
5
- "detectPopup": [{ "visible": "#ccpaCookieBanner, .privacy-sheet-content" }],
3
+ "prehideSelectors": ["#ccpaCookieContent_wrapper, article.ppvx_modal--overpanel, #cookiePrefsModal"],
4
+ "detectCmp": [{ "exists": "#ccpaCookieBanner, .privacy-sheet-content, #cookiePrefsModal" }],
5
+ "detectPopup": [{ "visible": "#ccpaCookieBanner, .privacy-sheet-content, #cookiePrefsModal" }],
6
6
  "optIn": [{ "click": "#acceptAllButton" }],
7
7
  "optOut": [
8
8
  {
@@ -13,13 +13,27 @@
13
13
  "if": { "exists": "a#manageCookiesLink" },
14
14
  "then": [{ "click": "a#manageCookiesLink" }],
15
15
  "else": [
16
- { "waitForVisible": ".privacy-sheet-content #formContent" },
17
16
  {
18
- "click": "#formContent .cookiepref-11m2iee-checkbox_base input:checked",
19
- "all": true,
20
- "optional": true
21
- },
22
- { "click": ".cookieAction.saveCookie,.confirmCookie #submitCookiesBtn" }
17
+ "if": { "exists": "#cookiePrefsModal" },
18
+ "then": [
19
+ { "waitForVisible": "#cookiePrefsModal #submitCookiesBtn, .confirmCookie #submitCookiesBtn" },
20
+ {
21
+ "click": "#cookiePrefsModal input[type='checkbox']:checked",
22
+ "all": true,
23
+ "optional": true
24
+ },
25
+ { "click": "#cookiePrefsModal #submitCookiesBtn, .confirmCookie #submitCookiesBtn" }
26
+ ],
27
+ "else": [
28
+ { "waitForVisible": ".privacy-sheet-content #formContent" },
29
+ {
30
+ "click": "#formContent .cookiepref-11m2iee-checkbox_base input:checked",
31
+ "all": true,
32
+ "optional": true
33
+ },
34
+ { "click": ".cookieAction.saveCookie,.confirmCookie #submitCookiesBtn" }
35
+ ]
36
+ }
23
37
  ]
24
38
  }
25
39
  ]
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "uwv-nl",
3
+ "_metadata": {
4
+ "vendorUrl": "https://www.uwv.nl/"
5
+ },
6
+ "cosmetic": false,
7
+ "runContext": {
8
+ "main": true,
9
+ "frame": false,
10
+ "urlPattern": "^https?://(?:www\\.)?uwv\\.nl/"
11
+ },
12
+ "prehideSelectors": ["#js-pw-consent-wrapper bgl-modal[test-id='cookie-modal']"],
13
+ "detectCmp": [
14
+ {
15
+ "exists": "#js-pw-consent-wrapper bgl-modal[test-id='cookie-modal']"
16
+ }
17
+ ],
18
+ "detectPopup": [
19
+ {
20
+ "visible": "#js-pw-consent-wrapper [data-ta-id='pw-consent-rejectAllButton']"
21
+ }
22
+ ],
23
+ "optIn": [
24
+ {
25
+ "waitForThenClick": "#js-pw-consent-wrapper [data-ta-id='pw-consent-acceptAllButton']"
26
+ }
27
+ ],
28
+ "optOut": [
29
+ {
30
+ "waitForThenClick": "#js-pw-consent-wrapper [data-ta-id='pw-consent-rejectAllButton']"
31
+ }
32
+ ],
33
+ "test": [
34
+ {
35
+ "waitForVisible": "#js-pw-consent-wrapper [data-ta-id='pw-consent-rejectAllButton']",
36
+ "check": "none",
37
+ "timeout": 2000
38
+ }
39
+ ]
40
+ }