@duckduckgo/autoconsent 16.32.0 → 16.34.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.32.0",
3
+ "version": "16.34.0",
4
4
  "description": "",
5
5
  "types": "./dist/types/web.d.ts",
6
6
  "exports": {
@@ -181,6 +181,12 @@
181
181
  "description": "Changes that should appear in release notes but do not fit another category",
182
182
  "releaseType": "none",
183
183
  "color": "#ededed"
184
+ },
185
+ {
186
+ "name": "code-update-needed",
187
+ "description": "Changes the autoconsent library code, so consuming browsers need a version update",
188
+ "releaseType": "none",
189
+ "color": "#fbca04"
184
190
  }
185
191
  ],
186
192
  "plugins": [
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "ccm-net",
3
+ "vendorUrl": "https://www.ccm.net/",
4
+ "cosmetic": true,
5
+ "runContext": {
6
+ "urlPattern": "^https?://([\\w-]+\\.)?ccm\\.net/"
7
+ },
8
+ "prehideSelectors": ["iframe[srcdoc*='frame-root']", ".incentive-banner"],
9
+ "detectCmp": [
10
+ {
11
+ "any": [{ "exists": "script[src*='cdn.appconsent.io/tcf2/'][src*='core.bundle.js']" }, { "exists": ".incentive-banner" }]
12
+ }
13
+ ],
14
+ "detectPopup": [
15
+ {
16
+ "any": [{ "visible": "iframe[srcdoc*='frame-root']" }, { "visible": ".incentive-banner" }]
17
+ }
18
+ ],
19
+ "optIn": [
20
+ {
21
+ "waitForThenClick": ["iframe[srcdoc*='frame-root']", ".button__acceptAll"],
22
+ "optional": true
23
+ }
24
+ ],
25
+ "optOut": [
26
+ {
27
+ "hide": ".incentive-banner"
28
+ },
29
+ {
30
+ "if": { "visible": "iframe[srcdoc*='frame-root']" },
31
+ "then": [{ "waitForThenClick": ["iframe[srcdoc*='frame-root']", ".button__skip"] }]
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "epaas",
3
+ "prehideSelectors": ["epaas-consent-drawer-shell"],
4
+ "detectCmp": [{ "exists": "epaas-consent-drawer-shell" }],
5
+ "detectPopup": [{ "visible": ["epaas-consent-drawer-shell", "section.consentDrawer"] }],
6
+ "optIn": [{ "waitForThenClick": ["epaas-consent-drawer-shell", "button.accept-button"] }],
7
+ "optOut": [
8
+ {
9
+ "if": { "exists": ["epaas-consent-drawer-shell", "button.reject-button"] },
10
+ "then": [{ "waitForThenClick": ["epaas-consent-drawer-shell", "button.reject-button"] }],
11
+ "else": [
12
+ { "waitForThenClick": ["epaas-consent-drawer-shell", "button.personalize-button"] },
13
+ { "waitFor": ["epaas-consent-drawer-shell", "epaas-policy-page-shell"] },
14
+ { "waitForThenClick": ["epaas-consent-drawer-shell", "button.save-button"] }
15
+ ]
16
+ }
17
+ ],
18
+ "test": [{ "cookieContains": "%22advertising%22%3A0" }]
19
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "paypal-cookieprefs",
3
+ "comment": "Cookie preferences page (.privacy-sheet-content on desktop, #cookiePrefsModal on mobile). Only automate it when we got here from the banner's \"Manage your cookies\" link, which appends a query string; a user who opens the page themselves lands on it without one and must be left free to edit their own preferences.",
4
+ "runContext": { "urlPattern": "^https://www\\.paypal\\.com/myaccount/privacy/cookiePrefs\\?" },
5
+ "prehideSelectors": ["#cookiePrefsModal, .privacy-sheet-content"],
6
+ "detectCmp": [{ "exists": "#cookiePrefsModal #formContent, .privacy-sheet-content #formContent" }],
7
+ "detectPopup": [{ "visible": "#cookiePrefsModal #formContent, .privacy-sheet-content #formContent" }],
8
+ "optIn": [
9
+ {
10
+ "click": "#formContent input[type='checkbox']:not(:checked)",
11
+ "all": true,
12
+ "optional": true
13
+ },
14
+ { "waitForThenClick": ".cookieAction #submitCookiesBtn", "timeout": 15000 }
15
+ ],
16
+ "optOut": [
17
+ {
18
+ "click": "#formContent input[type='checkbox']:checked",
19
+ "all": true,
20
+ "optional": true
21
+ },
22
+ {
23
+ "comment": "In \"manage\" mode the submit button is present but its sticky bar stays hidden, so wait for existence rather than visibility.",
24
+ "waitForThenClick": ".cookieAction #submitCookiesBtn",
25
+ "timeout": 15000
26
+ }
27
+ ],
28
+ "test": [{ "wait": 1000 }, { "cookieContains": "type%3Dexplicit" }]
29
+ }
@@ -1,42 +1,15 @@
1
1
  {
2
2
  "name": "paypal-us",
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" }],
3
+ "prehideSelectors": ["#ccpaCookieContent_wrapper"],
4
+ "detectCmp": [{ "exists": "#ccpaCookieBanner" }],
5
+ "detectPopup": [{ "visible": "#ccpaCookieBanner" }],
6
6
  "optIn": [{ "click": "#acceptAllButton" }],
7
7
  "optOut": [
8
8
  {
9
9
  "if": { "exists": "#bannerDeclineButton" },
10
10
  "then": [{ "click": "#bannerDeclineButton" }],
11
- "else": [
12
- {
13
- "if": { "exists": "a#manageCookiesLink" },
14
- "then": [{ "click": "a#manageCookiesLink" }],
15
- "else": [
16
- {
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 input[type='checkbox']:checked",
31
- "all": true,
32
- "optional": true
33
- },
34
- { "click": ".cookieAction #submitCookiesBtn" }
35
- ]
36
- }
37
- ]
38
- }
39
- ]
11
+ "comment": "Without a decline button the only way out is the banner's link to the cookie preferences page, which paypal-cookieprefs submits after the navigation.",
12
+ "else": [{ "click": "a#manageCookiesLink" }]
40
13
  }
41
14
  ],
42
15
  "test": [{ "wait": 1000 }, { "cookieContains": "type%3Dexplicit" }]