@duckduckgo/autoconsent 16.63.0 → 17.0.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 (84) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/addon-firefox/background.bundle.js +1 -0
  3. package/dist/addon-firefox/compact-rules.json +1 -1
  4. package/dist/addon-firefox/content.bundle.js +162 -35
  5. package/dist/addon-firefox/manifest.json +1 -1
  6. package/dist/addon-firefox/popup.bundle.js +1 -0
  7. package/dist/addon-firefox/rule-index.json +1 -1
  8. package/dist/addon-firefox/rules.json +1 -1
  9. package/dist/addon-mv3/background.bundle.js +1 -0
  10. package/dist/addon-mv3/compact-rules.json +1 -1
  11. package/dist/addon-mv3/content.bundle.js +162 -35
  12. package/dist/addon-mv3/manifest.json +1 -1
  13. package/dist/addon-mv3/popup.bundle.js +1 -0
  14. package/dist/addon-mv3/rule-index.json +1 -1
  15. package/dist/addon-mv3/rules.json +1 -1
  16. package/dist/autoconsent.cjs.js +162 -35
  17. package/dist/autoconsent.esm.js +162 -35
  18. package/dist/autoconsent.playwright.js +165 -35
  19. package/dist/autoconsent.standalone.js +163 -36
  20. package/dist/types/heuristics.d.ts +12 -3
  21. package/dist/types/types.d.ts +12 -1
  22. package/lib/cmps/base.ts +5 -1
  23. package/lib/heuristics.ts +240 -45
  24. package/lib/types.ts +16 -1
  25. package/lib/utils.ts +1 -0
  26. package/package.json +1 -1
  27. package/readme.md +1 -1
  28. package/rules/autoconsent/asrock.json +44 -0
  29. package/rules/autoconsent/consentmo.json +5 -2
  30. package/rules/autoconsent/cookie-script.json +34 -15
  31. package/rules/autoconsent/epaas.json +18 -1
  32. package/rules/autoconsent/fnsp-cookieconsent.json +30 -0
  33. package/rules/autoconsent/fod-fujitv.json +13 -0
  34. package/rules/autoconsent/hkdir.json +33 -0
  35. package/rules/autoconsent/jokul-cookie-consent.json +28 -0
  36. package/rules/autoconsent/lego.json +27 -5
  37. package/rules/autoconsent/mars-cookies-prompt.json +20 -0
  38. package/rules/autoconsent/niedziela-pl.json +35 -0
  39. package/rules/autoconsent/nikkeibp.json +10 -0
  40. package/rules/autoconsent/onecom-cookie-banner.json +25 -0
  41. package/rules/autoconsent/oslosportslager.no.json +34 -0
  42. package/rules/autoconsent/plex.tv.json +52 -0
  43. package/rules/autoconsent/radio-canada.json +28 -0
  44. package/rules/autoconsent/regjeringen.no.json +13 -0
  45. package/rules/autoconsent/roll20.json +50 -0
  46. package/rules/autoconsent/sirdata.json +8 -3
  47. package/rules/autoconsent/site-notifications-cookie-usage.json +25 -0
  48. package/rules/autoconsent/sparebank1-optin.json +10 -0
  49. package/rules/autoconsent/tri-table.json +6 -2
  50. package/rules/autoconsent/vinnova-se.json +50 -0
  51. package/rules/autoconsent/vortex-consent.json +33 -0
  52. package/rules/compact-rules.json +1 -1
  53. package/rules/rule-index.json +1 -1
  54. package/rules/rules.json +1 -1
  55. package/tests/asrock.spec.ts +3 -0
  56. package/tests/consentmo.spec.ts +2 -0
  57. package/tests/cookie-script.spec.ts +5 -0
  58. package/tests/epaas.spec.ts +3 -0
  59. package/tests/fnsp-cookieconsent.spec.ts +9 -0
  60. package/tests/fod-fujitv.spec.ts +3 -0
  61. package/tests/hkdir.spec.ts +10 -0
  62. package/tests/jokul-cookie-consent.spec.ts +3 -0
  63. package/tests/mars-cookies-prompt.spec.ts +3 -0
  64. package/tests/niedziela-pl.spec.ts +3 -0
  65. package/tests/nikkeibp.spec.ts +8 -0
  66. package/tests/onecom-cookie-banner.spec.ts +5 -0
  67. package/tests/oslosportslager.no.spec.ts +3 -0
  68. package/tests/plex.tv.spec.ts +5 -0
  69. package/tests/radio-canada.spec.ts +15 -0
  70. package/tests/regjeringen.no.spec.ts +3 -0
  71. package/tests/roll20.spec.ts +3 -0
  72. package/tests/sirdata.spec.ts +13 -1
  73. package/tests/site-notifications-cookie-usage.spec.ts +3 -0
  74. package/tests/sparebank1-optin.spec.ts +8 -0
  75. package/tests/tri-table.spec.ts +1 -1
  76. package/tests/vinnova-se.spec.ts +6 -0
  77. package/tests/vortex-consent.spec.ts +18 -0
  78. package/tests-wtr/heuristics/get-actionable-popups.ts +41 -7
  79. package/tests-wtr/heuristics/get-potential-popups.test.ts +235 -4
  80. package/tests-wtr/heuristics/heuristic-cmp.ts +16 -1
  81. package/rules/generated/auto_CA_plex.tv_ee4.json +0 -40
  82. package/rules/generated/auto_CA_support.plex.tv_gn3.json +0 -40
  83. package/tests/generated/auto_CA_plex.tv_ee4.spec.ts +0 -2
  84. package/tests/generated/auto_CA_support.plex.tv_gn3.spec.ts +0 -6
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "fnsp-cookieconsent",
3
+ "vendorUrl": "https://www.helse-bergen.no/",
4
+ "prehideSelectors": ["[class*=\"_cookieconsent-banner--open_\"]"],
5
+ "detectCmp": [
6
+ {
7
+ "exists": "[class*=\"_cookieconsent-banner_\"] [class*=\"_cookieconsent__button-container_\"]"
8
+ }
9
+ ],
10
+ "detectPopup": [
11
+ {
12
+ "visible": "[class*=\"_cookieconsent-banner--open_\"] [class*=\"_cookieconsent--initial_\"]"
13
+ }
14
+ ],
15
+ "optIn": [
16
+ {
17
+ "waitForThenClick": "[class*=\"_cookieconsent--initial_\"] [class*=\"_cookieconsent__button-container_\"] > button:nth-child(1)"
18
+ }
19
+ ],
20
+ "optOut": [
21
+ {
22
+ "waitForThenClick": "[class*=\"_cookieconsent--initial_\"] [class*=\"_cookieconsent__button-container_\"] > button:nth-child(2)"
23
+ }
24
+ ],
25
+ "test": [
26
+ {
27
+ "cookieContains": "%22analyticsConsent%22%3Afalse%2C%22thirdPartyConsent%22%3Afalse%2C%22surveyConsent%22%3Afalse"
28
+ }
29
+ ]
30
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "fod-fujitv",
3
+ "vendorUrl": "https://fod.fujitv.co.jp/",
4
+ "runContext": {
5
+ "urlPattern": "^https?://fod\\.fujitv\\.co\\.jp/"
6
+ },
7
+ "prehideSelectors": [".cookieCheckContainer"],
8
+ "detectCmp": [{ "visible": ".cookieCheckContainer .closeBtn" }],
9
+ "detectPopup": [{ "visible": ".cookieCheckContainer" }],
10
+ "optIn": [{ "waitForThenClick": ".cookieCheckContainer .closeBtn" }],
11
+ "optOut": [{ "waitForThenClick": ".cookieCheckContainer .closeBtn" }],
12
+ "test": [{ "cookieContains": "ACP=1" }]
13
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "hkdir",
3
+ "vendorUrl": "https://hkdir.no/",
4
+ "prehideSelectors": [".hkd-cookie-banner"],
5
+ "detectCmp": [
6
+ {
7
+ "exists": ".hkd-cookie-banner .hkd-cookie-banner-button-group"
8
+ },
9
+ {
10
+ "exists": "next-route-announcer"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": ".hkd-cookie-banner"
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": ".hkd-cookie-banner-button-group > button:nth-of-type(1)"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "waitForThenClick": ".hkd-cookie-banner-button-group > button:nth-of-type(2)"
26
+ }
27
+ ],
28
+ "test": [
29
+ {
30
+ "cookieContains": "cookie-consent=essential"
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "jokul-cookie-consent",
3
+ "vendorUrl": "https://jokul.fremtind.no/",
4
+ "prehideSelectors": [],
5
+ "detectCmp": [{ "exists": "[data-testid=\"jkl-cookie-consent-godta\"]" }],
6
+ "detectPopup": [{ "visible": "[data-testid=\"jkl-cookie-consent-godta\"]" }],
7
+ "optIn": [
8
+ {
9
+ "if": { "exists": "[data-testid=\"jkl-cookie-consent-godta-alle\"]" },
10
+ "then": [{ "waitForThenClick": "[data-testid=\"jkl-cookie-consent-godta-alle\"]" }],
11
+ "else": [{ "waitForThenClick": "[data-testid=\"jkl-cookie-consent-godta\"]" }]
12
+ }
13
+ ],
14
+ "optOut": [
15
+ {
16
+ "if": { "exists": "[data-testid=\"jkl-cookie-consent-nekt\"]" },
17
+ "then": [{ "waitForThenClick": "[data-testid=\"jkl-cookie-consent-nekt\"]" }],
18
+ "else": [
19
+ {
20
+ "if": { "exists": "[id^=\"jkl-cookie-modal\"] input[type=\"checkbox\"]:checked" },
21
+ "then": [{ "click": "[id^=\"jkl-cookie-modal\"] input[type=\"checkbox\"]:checked", "all": true }]
22
+ },
23
+ { "waitForThenClick": "[data-testid=\"jkl-cookie-consent-godta\"]" }
24
+ ]
25
+ }
26
+ ],
27
+ "test": [{ "cookieContains": "\"statistics\":\"denied\"" }]
28
+ }
@@ -4,23 +4,45 @@
4
4
  "urlPattern": "^https?://(www\\.)?lego\\.com/"
5
5
  },
6
6
  "prehideSelectors": ["[class*=\"ConsentModal_consent-modal__modal-overlay\"]"],
7
- "detectCmp": [{ "exists": "[data-test=\"cookie-necessary-button\"]" }],
8
- "detectPopup": [{ "visible": "[data-test=\"cookie-necessary-button\"]" }],
7
+ "detectCmp": [
8
+ {
9
+ "any": [{ "exists": "[data-test=\"cookie-necessary-button\"]" }, { "exists": "[data-test=\"age-gate-overlay\"]" }]
10
+ }
11
+ ],
12
+ "detectPopup": [
13
+ {
14
+ "comment": "the consent modal is only usable after the visitor leaves the site selector gate",
15
+ "any": [{ "visible": "[data-test=\"cookie-necessary-button\"]" }, { "visible": "[data-test=\"age-gate-overlay\"]" }]
16
+ }
17
+ ],
9
18
  "optOut": [
19
+ {
20
+ "comment": "without AGE_GATE the modal is briefly shown, then replaced by the site selector gate and re-rendered after it",
21
+ "any": [{ "cookieContains": "AGE_GATE=" }, { "waitForVisible": "[data-test=\"age-gate-overlay\"]", "timeout": 3000 }],
22
+ "optional": true
23
+ },
24
+ { "waitForVisible": "[data-test=\"age-gate-overlay\"]", "check": "none", "timeout": 120000 },
10
25
  { "waitForThenClick": "[data-test=\"cookie-necessary-button\"]" },
11
26
  {
12
- "any": [{ "cookieContains": "AGE_GATE=" }, { "waitForVisible": "[data-test=\"age-gate-overlay\"]", "timeout": 1000 }],
27
+ "any": [{ "cookieContains": "AGE_GATE=" }, { "waitForVisible": "[data-test=\"age-gate-overlay\"]", "timeout": 3000 }],
13
28
  "optional": true
14
29
  },
15
30
  {
16
31
  "if": { "visible": "[data-test=\"age-gate-overlay\"]" },
17
32
  "then": [
18
- { "waitForVisible": "[data-test=\"age-gate-overlay\"]", "check": "none", "timeout": 30000 },
33
+ { "waitForVisible": "[data-test=\"age-gate-overlay\"]", "check": "none", "timeout": 120000 },
19
34
  { "waitForThenClick": "[data-test=\"cookie-necessary-button\"]", "timeout": 5000 }
20
35
  ],
21
36
  "optional": true
22
37
  }
23
38
  ],
24
- "optIn": [{ "waitForThenClick": "[data-test=\"cookie-accept-all\"]" }],
39
+ "optIn": [
40
+ {
41
+ "any": [{ "cookieContains": "AGE_GATE=" }, { "waitForVisible": "[data-test=\"age-gate-overlay\"]", "timeout": 3000 }],
42
+ "optional": true
43
+ },
44
+ { "waitForVisible": "[data-test=\"age-gate-overlay\"]", "check": "none", "timeout": 120000 },
45
+ { "waitForThenClick": "[data-test=\"cookie-accept-all\"]" }
46
+ ],
25
47
  "test": [{ "cookieContains": "%22key%22%3A%22analytics%22%2C%22value%22%3Afalse" }]
26
48
  }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "mars-cookies-prompt",
3
+ "prehideSelectors": [".cookies-prompt__banner"],
4
+ "detectCmp": [{ "exists": ".cookies-prompt__wrapper .cookies-prompt__banner" }],
5
+ "detectPopup": [{ "visible": ".cookies-prompt__wrapper .cookies-prompt__banner" }],
6
+ "optIn": [{ "waitForThenClick": ".cookies-prompt__banner .cookies-prompt__actions-btn_danger" }],
7
+ "optOut": [
8
+ {
9
+ "if": { "exists": ".cookies-prompt__banner_preview" },
10
+ "then": [{ "click": ".cookies-prompt__banner_preview .cookies-prompt__actions-btn.btn-secondary" }]
11
+ },
12
+ { "waitForVisible": ".cookies-prompt__actions-wrap_details" },
13
+ {
14
+ "if": { "exists": ".cookies-prompt__banner_details .switch input:checked:not([disabled])" },
15
+ "then": [{ "click": ".cookies-prompt__banner_details .switch input:checked:not([disabled])", "all": true }]
16
+ },
17
+ { "click": ".cookies-prompt__actions-wrap_details .cookies-prompt__actions-btn.btn-secondary" }
18
+ ],
19
+ "test": [{ "cookieContains": "cookies_consent=" }]
20
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "niedziela-pl",
3
+ "vendorUrl": "https://niedziela.pl/",
4
+ "cosmetic": true,
5
+ "runContext": {
6
+ "urlPattern": "^https?://([\\w-]+\\.)?niedziela\\.pl/"
7
+ },
8
+ "prehideSelectors": [".cookies:has(.closecookies)"],
9
+ "detectCmp": [
10
+ {
11
+ "exists": ".cookies .closecookies"
12
+ }
13
+ ],
14
+ "detectPopup": [
15
+ {
16
+ "visible": ".cookies .closecookies"
17
+ }
18
+ ],
19
+ "optIn": [
20
+ {
21
+ "waitForThenClick": ".cookies .closecookies"
22
+ }
23
+ ],
24
+ "optOut": [
25
+ {
26
+ "hide": ".cookies:has(.closecookies)"
27
+ }
28
+ ],
29
+ "test": [
30
+ {
31
+ "visible": ".cookies .closecookies",
32
+ "check": "none"
33
+ }
34
+ ]
35
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "nikkeibp",
3
+ "vendorUrl": "https://www.nikkeibp.co.jp/",
4
+ "prehideSelectors": [".bpPrivacy"],
5
+ "detectCmp": [{ "exists": ".bpPrivacy .bpPrivacy_button-close" }],
6
+ "detectPopup": [{ "visible": ".bpPrivacy .bpPrivacy_button-close" }],
7
+ "optIn": [{ "waitForThenClick": ".bpPrivacy .bpPrivacy_button-close" }],
8
+ "optOut": [{ "waitForThenClick": ".bpPrivacy .bpPrivacy_button-close" }],
9
+ "test": [{ "waitForVisible": ".bpPrivacy", "timeout": 1000, "check": "none" }]
10
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "onecom-cookie-banner",
3
+ "cosmetic": true,
4
+ "prehideSelectors": ["#oc_cb_wrapper"],
5
+ "detectCmp": [
6
+ {
7
+ "exists": "#oc_cb_wrapper #oc_cb_btn"
8
+ }
9
+ ],
10
+ "detectPopup": [
11
+ {
12
+ "visible": "#oc_cb_wrapper"
13
+ }
14
+ ],
15
+ "optIn": [
16
+ {
17
+ "waitForThenClick": "#oc_cb_btn"
18
+ }
19
+ ],
20
+ "optOut": [
21
+ {
22
+ "hide": "#oc_cb_wrapper"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "oslosportslager.no",
3
+ "vendorUrl": "https://oslosportslager.no/",
4
+ "cosmetic": false,
5
+ "runContext": {
6
+ "urlPattern": "^https?://(www\\.)?oslosportslager\\.no/"
7
+ },
8
+ "prehideSelectors": ["#footerCurtainCookie"],
9
+ "detectCmp": [
10
+ {
11
+ "exists": "#footerCurtainCookie .footerCookieLink"
12
+ }
13
+ ],
14
+ "detectPopup": [
15
+ {
16
+ "visible": "#footerCurtainCookie"
17
+ }
18
+ ],
19
+ "optIn": [
20
+ {
21
+ "waitForThenClick": "#footerCurtainCookie .footerButtonFix"
22
+ }
23
+ ],
24
+ "optOut": [
25
+ {
26
+ "waitForThenClick": "#footerCurtainCookie .footerCookieLink"
27
+ }
28
+ ],
29
+ "test": [
30
+ {
31
+ "cookieContains": "SL_cookie=NO"
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "plex.tv",
3
+ "vendorUrl": "https://www.plex.tv/",
4
+ "runContext": {
5
+ "urlPattern": "^https?://(\\w+\\.)?plex\\.tv/"
6
+ },
7
+ "prehideSelectors": ["[data-testid=cookieBar]", ".notification-bar.cookie-consent"],
8
+ "detectCmp": [
9
+ {
10
+ "any": [
11
+ { "exists": "[data-testid=cookieBar]" },
12
+ { "exists": "[data-testid=adConsentModal]" },
13
+ { "exists": ".notification-bar.cookie-consent" }
14
+ ]
15
+ }
16
+ ],
17
+ "detectPopup": [
18
+ {
19
+ "any": [
20
+ { "visible": "[data-testid=cookieBar]" },
21
+ { "visible": "[data-testid=adConsentModal]" },
22
+ { "visible": ".notification-bar.cookie-consent" }
23
+ ]
24
+ }
25
+ ],
26
+ "optIn": [
27
+ {
28
+ "if": { "visible": "[data-testid=adConsentModal]" },
29
+ "then": [
30
+ { "waitForThenClick": "[data-testid=adConsentAgreeButton]" },
31
+ { "waitForThenClick": "[data-testid=cookieBarAcceptButton]", "timeout": 5000, "optional": true }
32
+ ],
33
+ "else": [{ "waitForThenClick": "[data-testid=cookieBarAcceptButton], .notification-bar.cookie-consent .cookie-consent-accept" }]
34
+ }
35
+ ],
36
+ "optOut": [
37
+ {
38
+ "if": { "visible": "[data-testid=adConsentModal]" },
39
+ "then": [
40
+ { "waitForThenClick": "[data-testid=adConsentDisagreeButton]" },
41
+ {
42
+ "waitForThenClick": "[data-testid=cookieBarRejectButton]",
43
+ "timeout": 5000,
44
+ "optional": true,
45
+ "comment": "the cookie bar is shown once the ad consent modal is dismissed"
46
+ }
47
+ ],
48
+ "else": [{ "waitForThenClick": "[data-testid=cookieBarRejectButton], .notification-bar.cookie-consent .cookie-consent-reject" }]
49
+ }
50
+ ],
51
+ "test": [{ "cookieContains": "plex_tv_cookie_consent=2" }]
52
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "radio-canada",
3
+ "cosmetic": true,
4
+ "prehideSelectors": [
5
+ "#js-legal-disclaimer.g-alert-cookie, #js-legal-disclaimer.cookie-consent-banner, #info-shell-legal-disclaimer, #oh-shell-legal-disclaimer"
6
+ ],
7
+ "detectCmp": [
8
+ {
9
+ "exists": "#js-legal-disclaimer.g-alert-cookie, #js-legal-disclaimer.cookie-consent-banner, #info-shell-legal-disclaimer, #oh-shell-legal-disclaimer"
10
+ }
11
+ ],
12
+ "detectPopup": [
13
+ {
14
+ "visible": "#js-legal-disclaimer.g-alert-cookie, #js-legal-disclaimer.cookie-consent-banner, #info-shell-legal-disclaimer, #oh-shell-legal-disclaimer",
15
+ "check": "any"
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": "#js-legal-disclaimer button.e-button-close, #js-legal-disclaimer button[data-close-cookie-disclaimer], #info-shell-legal-disclaimer button, #oh-shell-legal-disclaimer button"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "hide": "#js-legal-disclaimer.g-alert-cookie, #js-legal-disclaimer.cookie-consent-banner, #info-shell-legal-disclaimer, #oh-shell-legal-disclaimer"
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "regjeringen.no",
3
+ "vendorUrl": "https://www.regjeringen.no/",
4
+ "runContext": {
5
+ "urlPattern": "^https?://(www\\.)?regjeringen\\.no/"
6
+ },
7
+ "prehideSelectors": ["#cb_wrapper-std #overlay-std"],
8
+ "detectCmp": [{ "exists": "#cb_wrapper-std #cookieApiData" }],
9
+ "detectPopup": [{ "visible": "#cb_wrapper-std #overlay-std #userSelect" }],
10
+ "optIn": [{ "waitForThenClick": "#cb_wrapper-std #userSelectAll" }],
11
+ "optOut": [{ "waitForThenClick": "#cb_wrapper-std #userSelect" }],
12
+ "test": [{ "waitForVisible": "#cb_wrapper-std #overlay-std", "check": "none", "timeout": 2000 }]
13
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "roll20",
3
+ "vendorUrl": "https://roll20.net/",
4
+ "runContext": {
5
+ "urlPattern": "^https://([a-z0-9-]+\\.)?roll20\\.net/"
6
+ },
7
+ "prehideSelectors": ["#gdpr-notification"],
8
+ "detectCmp": [
9
+ {
10
+ "exists": "#gdpr-notification #banner-link-preferences"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": "#gdpr-notification"
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": "#gdpr-notification-dismiss-button"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "waitForThenClick": "#banner-link-preferences"
26
+ },
27
+ {
28
+ "waitForVisible": "#cookie-modal .cookie-modal-content",
29
+ "timeout": 2000
30
+ },
31
+ {
32
+ "if": {
33
+ "exists": "#cookie-modal-input:checked"
34
+ },
35
+ "then": [
36
+ {
37
+ "click": "#cookie-modal-input"
38
+ }
39
+ ]
40
+ },
41
+ {
42
+ "click": "#cookie-modal-dismiss"
43
+ }
44
+ ],
45
+ "test": [
46
+ {
47
+ "cookieContains": "gdpr_accepts_cookies=false"
48
+ }
49
+ ]
50
+ }
@@ -9,12 +9,13 @@
9
9
  ],
10
10
  "detectPopup": [
11
11
  {
12
- "visible": "#sd-cmp"
12
+ "visible": "#sd-cmp [role='dialog']",
13
+ "check": "any"
13
14
  }
14
15
  ],
15
16
  "optIn": [
16
17
  {
17
- "waitForThenClick": "#sd-cmp .sd-cmp-3cRQ2"
18
+ "waitForThenClick": "#sd-cmp [data-sd-override='choiceButtons']"
18
19
  }
19
20
  ],
20
21
  "optOut": [
@@ -57,7 +58,11 @@
57
58
  ],
58
59
  "else": [
59
60
  {
60
- "waitForThenClick": "#sd-cmp [role='button'][title='Close']"
61
+ "waitForVisible": "#sd-cmp [role='button'][title='Close']",
62
+ "check": "any"
63
+ },
64
+ {
65
+ "click": "#sd-cmp [role='button'][title='Close']"
61
66
  }
62
67
  ]
63
68
  }
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "site-notifications-cookie-usage",
3
+ "cosmetic": true,
4
+ "prehideSelectors": ["[data-t=\"site-notifications\"] [data-notice-key=\"cookie_usage\"]"],
5
+ "detectCmp": [
6
+ {
7
+ "exists": "[data-t=\"site-notifications\"] [data-notice-key=\"cookie_usage\"]"
8
+ }
9
+ ],
10
+ "detectPopup": [
11
+ {
12
+ "visible": "[data-t=\"site-notifications\"] [data-notice-key=\"cookie_usage\"]"
13
+ }
14
+ ],
15
+ "optIn": [
16
+ {
17
+ "waitForThenClick": "[data-notice-key=\"cookie_usage\"] a[href*=\"/consent?n=cookie_usage\"]"
18
+ }
19
+ ],
20
+ "optOut": [
21
+ {
22
+ "hide": "[data-t=\"site-notifications\"] [data-notice-key=\"cookie_usage\"]"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "sparebank1-optin",
3
+ "vendorUrl": "https://www.sparebank1.no/",
4
+ "prehideSelectors": ["#opt-in .optin"],
5
+ "detectCmp": [{ "exists": "#opt-in .optin #optin--acceptAll" }],
6
+ "detectPopup": [{ "visible": "#opt-in .optin" }],
7
+ "optIn": [{ "waitForThenClick": "#opt-in #optin--acceptAll" }],
8
+ "optOut": [{ "waitForThenClick": "#opt-in #optin--rejectAll, #opt-in #optin--onlyNeeded" }],
9
+ "test": [{ "waitForVisible": "#opt-in .optin", "check": "none", "timeout": 2000 }]
10
+ }
@@ -7,8 +7,12 @@
7
7
  "optIn": [{ "waitForThenClick": "[class^=\"app_gdpr--\"] div > button:last-of-type:nth-of-type(2)" }],
8
8
  "optOut": [
9
9
  { "waitForThenClick": "[class^=\"app_gdpr--\"] div > button:first-of-type:nth-last-of-type(2)", "retry": 2, "retryInterval": 500 },
10
- { "waitForThenClick": "[class^=\"app_gdpr--\"] div > button:nth-of-type(2):nth-last-of-type(2)" },
10
+ {
11
+ "if": { "exists": "[class^=\"app_gdpr--\"] div > button:nth-of-type(2):nth-last-of-type(2)" },
12
+ "then": [{ "click": "[class^=\"app_gdpr--\"] div > button:nth-of-type(2):nth-last-of-type(2)" }],
13
+ "else": [{ "click": "[class^=\"app_gdpr--\"] div > button:first-of-type:nth-last-of-type(2)", "optional": true }]
14
+ },
11
15
  { "waitForVisible": "[class^=\"app_gdpr--\"] button", "check": "none" }
12
16
  ],
13
- "test": [{ "cookieContains": "tt_cons_addtl=" }]
17
+ "test": [{ "any": [{ "cookieContains": "tt_cons_addtl=" }, { "cookieContains": "pubConsent=" }] }]
14
18
  }
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "vinnova-se",
3
+ "vendorUrl": "https://www.vinnova.se/",
4
+ "runContext": {
5
+ "urlPattern": "^https?://(www\\.)?vinnova\\.se/"
6
+ },
7
+ "prehideSelectors": [".component-lightbox-gdpr"],
8
+ "detectCmp": [
9
+ {
10
+ "exists": ".component-lightbox-gdpr .gdpr_cookie_settings_accept_cookies"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": ".component-lightbox-gdpr .gdpr_cookie_settings_accept_cookies"
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": ".gdpr_cookie_settings_accept_cookies__button-container__button.button--solid--primary"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "waitForThenClick": ".gdpr_cookie_settings_accept_cookies__button-container__button.button--solid--secondary"
26
+ },
27
+ {
28
+ "waitForVisible": ".gdpr_cookie_settings_cookie_settings"
29
+ },
30
+ {
31
+ "comment": "levels are cumulative: switching off the lowest level switches off all higher ones",
32
+ "if": {
33
+ "exists": ".gdpr_cookie_settings_cookie_settings .component-toggle-button[toggle_selected=True]"
34
+ },
35
+ "then": [
36
+ {
37
+ "click": ".gdpr_cookie_settings_cookie_settings .component-toggle-button[toggle_selected=True]"
38
+ }
39
+ ]
40
+ },
41
+ {
42
+ "waitForThenClick": ".gdpr_cookie_settings_cookie_settings__main-section__button-container__button"
43
+ }
44
+ ],
45
+ "test": [
46
+ {
47
+ "cookieContains": "_vinnova_gdpr=0"
48
+ }
49
+ ]
50
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "vortex-consent",
3
+ "prehideSelectors": [".consent-overlay", "div.consent[role=dialog]"],
4
+ "detectCmp": [
5
+ {
6
+ "exists": "div.consent[role=dialog] .consent-main-buttons .consent-decline-all"
7
+ }
8
+ ],
9
+ "detectPopup": [
10
+ {
11
+ "visible": "div.consent[role=dialog] .consent-main-buttons .consent-decline-all"
12
+ }
13
+ ],
14
+ "optIn": [
15
+ {
16
+ "waitForThenClick": "div.consent[role=dialog] .consent-main-buttons .consent-accept-all"
17
+ }
18
+ ],
19
+ "optOut": [
20
+ {
21
+ "waitForThenClick": "div.consent[role=dialog] .consent-main-buttons .consent-decline-all"
22
+ }
23
+ ],
24
+ "test": [
25
+ {
26
+ "cookieContains": "PrivacyPolicyOptOut"
27
+ },
28
+ {
29
+ "cookieContains": "UsageAnalysisConsent=yes",
30
+ "negated": true
31
+ }
32
+ ]
33
+ }