@duckduckgo/autoconsent 16.23.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.23.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
  }
@@ -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
  }