@duckduckgo/autoconsent 16.35.0 → 16.37.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.35.0",
3
+ "version": "16.37.0",
4
4
  "description": "",
5
5
  "types": "./dist/types/web.d.ts",
6
6
  "exports": {
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "aquasana.com",
3
3
  "prehideSelectors": ["#consent-tracking"],
4
- "detectCmp": [{ "exists": "#consent-tracking" }],
5
- "detectPopup": [{ "exists": "#consent-tracking" }],
4
+ "detectCmp": [{ "visible": "#consent-tracking" }],
5
+ "detectPopup": [{ "visible": "#consent-tracking" }],
6
6
  "optIn": [
7
7
  {
8
8
  "waitForThenClick": "#consent-tracking .affirm.btn"
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "as-adventure",
3
+ "prehideSelectors": [
4
+ "dialog[data-testid=\"cookie-message-modal\"]",
5
+ "[data-testid=\"cookie-message-bottom-sheet\"]",
6
+ "[data-testid=\"cookie-message-bottom-sheet-overlay\"]"
7
+ ],
8
+ "detectCmp": [
9
+ {
10
+ "exists": "dialog[data-testid=\"cookie-message-modal\"] button[data-testid=\"decline-all-cookies\"], [data-testid=\"cookie-message-bottom-sheet\"] button[data-testid=\"decline-all-cookies\"]"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": "dialog[data-testid=\"cookie-message-modal\"], [data-testid=\"cookie-message-bottom-sheet\"]",
16
+ "check": "any"
17
+ }
18
+ ],
19
+ "optIn": [
20
+ {
21
+ "waitForThenClick": "dialog[data-testid=\"cookie-message-modal\"] button[data-testid=\"accept-all-cookies\"], [data-testid=\"cookie-message-bottom-sheet\"] button[data-testid=\"accept-all-cookies\"]",
22
+ "all": true,
23
+ "retry": 10,
24
+ "retryInterval": 500
25
+ }
26
+ ],
27
+ "optOut": [
28
+ {
29
+ "waitForThenClick": "dialog[data-testid=\"cookie-message-modal\"] button[data-testid=\"decline-all-cookies\"], [data-testid=\"cookie-message-bottom-sheet\"] button[data-testid=\"decline-all-cookies\"]",
30
+ "all": true,
31
+ "retry": 10,
32
+ "retryInterval": 500
33
+ }
34
+ ],
35
+ "test": [
36
+ {
37
+ "waitForVisible": "dialog[data-testid=\"cookie-message-modal\"], [data-testid=\"cookie-message-bottom-sheet\"]",
38
+ "timeout": 2000,
39
+ "check": "none"
40
+ }
41
+ ]
42
+ }
@@ -1,27 +1,65 @@
1
1
  {
2
2
  "name": "bbc.com",
3
3
  "runContext": {
4
- "urlPattern": "^https://(www\\.)?bbc\\.(com|co\\.uk)"
4
+ "urlPattern": "^https://(www\\.)?bbc\\.(com|co\\.uk)/"
5
5
  },
6
- "prehideSelectors": ["*[aria-labelledby=\"consent-banner-title\"]"],
6
+ "prehideSelectors": ["*[aria-labelledby=\"consent-banner-title\"]", "#bbccookies-prompt"],
7
7
  "detectCmp": [
8
8
  {
9
- "exists": "#consent-banner-title"
9
+ "any": [
10
+ {
11
+ "exists": "#consent-banner-title"
12
+ },
13
+ {
14
+ "exists": "#bbccookies-prompt"
15
+ }
16
+ ]
10
17
  }
11
18
  ],
12
19
  "detectPopup": [
13
20
  {
14
- "visible": "#consent-banner-title"
21
+ "any": [
22
+ {
23
+ "visible": "#consent-banner-title"
24
+ },
25
+ {
26
+ "visible": "#bbccookies-prompt"
27
+ }
28
+ ]
15
29
  }
16
30
  ],
17
31
  "optIn": [
18
32
  {
19
- "waitForThenClick": "button[data-testid=\"accept-button\"]"
33
+ "if": {
34
+ "exists": "#bbccookies-prompt"
35
+ },
36
+ "then": [
37
+ {
38
+ "waitForThenClick": "#bbccookies-accept-button"
39
+ }
40
+ ],
41
+ "else": [
42
+ {
43
+ "waitForThenClick": "button[data-testid=\"accept-button\"]"
44
+ }
45
+ ]
20
46
  }
21
47
  ],
22
48
  "optOut": [
23
49
  {
24
- "waitForThenClick": "button[data-testid=\"reject-button\"]"
50
+ "if": {
51
+ "exists": "#bbccookies-prompt"
52
+ },
53
+ "then": [
54
+ {
55
+ "waitForThenClick": "#bbccookies-reject-button"
56
+ }
57
+ ],
58
+ "else": [
59
+ {
60
+ "waitForThenClick": "button[data-testid=\"reject-button\"]"
61
+ }
62
+ ]
25
63
  }
26
64
  ],
27
65
  "test": [
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "bcferries.com",
3
+ "_metadata": {
4
+ "vendorUrl": "https://www.bcferries.com/"
5
+ },
6
+ "runContext": {
7
+ "urlPattern": "^https?://(\\w+\\.)?bcferries\\.com/"
8
+ },
9
+ "prehideSelectors": ["#note .cpref"],
10
+ "detectCmp": [
11
+ {
12
+ "exists": "#note .cpref #cPrefToggle"
13
+ }
14
+ ],
15
+ "detectPopup": [
16
+ {
17
+ "visible": "#note .cpref"
18
+ }
19
+ ],
20
+ "optIn": [
21
+ {
22
+ "waitForThenClick": "#cAccept"
23
+ }
24
+ ],
25
+ "optOut": [
26
+ {
27
+ "waitForThenClick": "#cPrefToggle"
28
+ },
29
+ {
30
+ "waitForThenClick": "#cPrefModal label[for=\"tab-4r\"]"
31
+ },
32
+ {
33
+ "waitForThenClick": "#cPrefSave"
34
+ }
35
+ ],
36
+ "comment": "Saving preferences triggers the site's own location.reload(), so a cookieContains self-test races with the navigation and is omitted."
37
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "mensaje-cookies",
3
+ "prehideSelectors": ["#mensajeCookies", "#divConfigCookies"],
4
+ "detectCmp": [
5
+ { "exists": "#mensajeCookies .cajaCookies #btnAcceptAll" },
6
+ {
7
+ "any": [{ "exists": "#mensajeCookies #btnAcceptNoAllCookies" }, { "exists": "#divConfigCookies #btnAcceptNoCookies" }]
8
+ }
9
+ ],
10
+ "detectPopup": [{ "visible": "#mensajeCookies .cajaCookies" }],
11
+ "optIn": [{ "waitForThenClick": "#mensajeCookies #btnAcceptAll" }],
12
+ "optOut": [
13
+ {
14
+ "if": { "exists": "#mensajeCookies #btnAcceptNoAllCookies" },
15
+ "then": [{ "waitForThenClick": "#mensajeCookies #btnAcceptNoAllCookies" }],
16
+ "else": [
17
+ { "waitForThenClick": "#mensajeCookies #btnConfigCookies" },
18
+ { "waitForThenClick": "#divConfigCookies #btnAcceptNoCookies" }
19
+ ]
20
+ },
21
+ { "waitForVisible": "#mensajeCookies .cajaCookies", "check": "none", "timeout": 3000 }
22
+ ],
23
+ "test": [{ "visible": "#mensajeCookies .cajaCookies", "check": "none" }]
24
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "mipro.com.tw",
3
+ "runContext": { "urlPattern": "^https?://(\\w+\\.)?mipro\\.com\\.tw/" },
4
+ "prehideSelectors": [".cookie-modal.open"],
5
+ "detectCmp": [{ "exists": ".cookie-modal.open .cookie-box" }],
6
+ "detectPopup": [{ "visible": ".cookie-modal.open .btn-box .simple-btn.cancel" }],
7
+ "optIn": [{ "waitForThenClick": ".cookie-modal.open .btn-box .simple-btn.agree" }],
8
+ "optOut": [{ "waitForThenClick": ".cookie-modal.open .btn-box .simple-btn.cancel" }],
9
+ "test": [{ "exists": ".cookie-modal.open", "negated": true }]
10
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "mirasvit-gdpr",
3
+ "prehideSelectors": ["#gdprCookieBar", "#gdprCookieBarOverlay", ".mst-gdpr__cookie-bar-wrapper", ".mst-gdpr__cookie-bar-overlay"],
4
+ "detectCmp": [{ "exists": ".mst-gdpr__cookie-bar .mst-gdpr__buttons" }],
5
+ "detectPopup": [{ "visible": ".mst-gdpr__cookie-bar .mst-gdpr__buttons", "check": "any" }],
6
+ "optIn": [
7
+ {
8
+ "any": [
9
+ { "click": ".mst-gdpr__buttons [data-trigger-settings=agree]" },
10
+ { "click": ".mst-gdpr__buttons button[\\@click^=handleAllow]" }
11
+ ]
12
+ }
13
+ ],
14
+ "optOut": [
15
+ {
16
+ "if": {
17
+ "visible": ".mst-gdpr__buttons [data-trigger-settings=decline],.mst-gdpr__buttons button[\\@click=handleDecline]",
18
+ "check": "any"
19
+ },
20
+ "then": [
21
+ {
22
+ "any": [
23
+ { "click": ".mst-gdpr__buttons [data-trigger-settings=decline]" },
24
+ { "click": ".mst-gdpr__buttons button[\\@click=handleDecline]" }
25
+ ]
26
+ }
27
+ ],
28
+ "else": [
29
+ {
30
+ "any": [
31
+ { "click": ".mst-gdpr__buttons [data-trigger-settings=trigger]" },
32
+ { "click": ".mst-gdpr__buttons button[\\@click=openSettings]" }
33
+ ]
34
+ },
35
+ {
36
+ "waitForVisible": "[data-mst-gdpr-settings-apply],.mst-gdpr__cookie-settings--success-btn,[x-on\\:click=save]",
37
+ "check": "any",
38
+ "timeout": 5000
39
+ },
40
+ {
41
+ "waitForThenClick": "input.checkbox[data-group-id]:not([disabled]):checked",
42
+ "all": true,
43
+ "timeout": 2000,
44
+ "optional": true
45
+ },
46
+ {
47
+ "any": [
48
+ { "click": "[data-mst-gdpr-settings-apply]" },
49
+ { "click": ".mst-gdpr__cookie-settings--success-btn" },
50
+ { "click": "[x-on\\:click=save]" }
51
+ ]
52
+ }
53
+ ]
54
+ },
55
+ { "waitForVisible": ".mst-gdpr__cookie-bar .mst-gdpr__buttons", "check": "none", "timeout": 10000 }
56
+ ],
57
+ "test": [{ "cookieContains": "gdpr_cookie_consent=" }, { "visible": ".mst-gdpr__cookie-bar .mst-gdpr__buttons", "check": "none" }]
58
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "tlc-direct",
3
+ "runContext": { "urlPattern": "^https?://(\\w+\\.)?tlc-direct\\.co\\.uk/" },
4
+ "prehideSelectors": ["#cookie-consent"],
5
+ "detectCmp": [
6
+ { "exists": "#cookie-consent #cookie-consent-btn-customise" },
7
+ { "exists": "#cookie-consent #cookie-consent-btn-accept-some" }
8
+ ],
9
+ "detectPopup": [{ "visible": "#cookie-consent" }],
10
+ "optIn": [{ "waitForThenClick": "#cookie-consent-btn-accept-all" }],
11
+ "optOut": [
12
+ { "waitForThenClick": "#cookie-consent-btn-customise" },
13
+ { "if": { "exists": "#consent-marketing:checked" }, "then": [{ "click": "#consent-marketing" }] },
14
+ { "if": { "exists": "#consent-analytics:checked" }, "then": [{ "click": "#consent-analytics" }] },
15
+ { "waitForThenClick": "#cookie-consent-btn-accept-some" }
16
+ ],
17
+ "test": [{ "cookieContains": "%22analytics%22%3Afalse%2C%22marketing%22%3Afalse" }]
18
+ }
@@ -2,38 +2,40 @@
2
2
  "name": "xe.com",
3
3
  "vendorUrl": "https://www.xe.com/",
4
4
  "runContext": {
5
- "urlPattern": "^https://www\\.xe\\.com/"
5
+ "urlPattern": "^https?://(www\\.)?xe\\.com/"
6
6
  },
7
- "prehideSelectors": ["[class*=ConsentBanner]"],
7
+ "prehideSelectors": ["dialog[aria-labelledby=\"consent-title\"]", "div.animate-slideFromLeft.fixed.bottom-0.z-50"],
8
8
  "detectCmp": [
9
9
  {
10
- "exists": "[class*=ConsentBanner]"
10
+ "exists": "dialog[aria-labelledby=\"consent-title\"], div.animate-slideFromLeft.fixed.bottom-0.z-50"
11
11
  }
12
12
  ],
13
13
  "detectPopup": [
14
14
  {
15
- "visible": "[class*=ConsentBanner]"
15
+ "visible": "dialog[aria-labelledby=\"consent-title\"], div.animate-slideFromLeft.fixed.bottom-0.z-50"
16
16
  }
17
17
  ],
18
18
  "optIn": [
19
19
  {
20
- "waitForThenClick": "[class*=ConsentBanner] .egnScw"
20
+ "waitForThenClick": "dialog[aria-labelledby=\"consent-title\"] button.bg-xe-primary-500, div.animate-slideFromLeft button.bg-xe-primary-500"
21
21
  }
22
22
  ],
23
23
  "optOut": [
24
24
  {
25
- "wait": 1000
25
+ "waitForThenClick": "dialog[aria-labelledby=\"consent-title\"] button.border-xe-primary-500, div.animate-slideFromLeft button.border-xe-primary-500",
26
+ "retry": 3,
27
+ "retryInterval": 500
26
28
  },
27
29
  {
28
- "waitForThenClick": "[class*=ConsentBanner] .frDWEu"
30
+ "waitForVisible": "[data-testid=\"performance-toggle\"]"
29
31
  },
30
32
  {
31
- "waitForThenClick": "[class*=ConsentBanner] .hXIpFU"
33
+ "waitForThenClick": "dialog[aria-labelledby=\"consent-title\"] button.bg-xe-primary-500, div.animate-slideFromLeft button.bg-xe-primary-500"
32
34
  }
33
35
  ],
34
36
  "test": [
35
37
  {
36
- "cookieContains": "xeConsentState={%22performance%22:false%2C%22marketing%22:false%2C%22compliance%22:false}"
38
+ "cookieContains": "xeConsentState={%22performance%22:false%2C%22marketing%22:false"
37
39
  }
38
40
  ]
39
41
  }