@duckduckgo/autoconsent 3.0.4 → 4.1.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 (183) hide show
  1. package/.eslintrc +21 -0
  2. package/.github/ISSUE_TEMPLATE/broken-site-issue.md +29 -0
  3. package/.github/dependabot.yml +6 -0
  4. package/.github/workflows/checks.yml +19 -0
  5. package/.prettierrc +4 -0
  6. package/CHANGELOG.md +65 -0
  7. package/Jenkinsfile +4 -4
  8. package/api.md +10 -1
  9. package/dist/addon-firefox/background.bundle.js +312 -1
  10. package/dist/addon-firefox/content.bundle.js +1912 -1
  11. package/dist/addon-firefox/manifest.json +2 -2
  12. package/dist/addon-firefox/rules.json +183 -42
  13. package/dist/addon-mv3/background.bundle.js +312 -1
  14. package/dist/addon-mv3/content.bundle.js +1912 -1
  15. package/dist/addon-mv3/devtools/background.html +10 -0
  16. package/dist/addon-mv3/devtools/bulma.min.css +1 -0
  17. package/dist/addon-mv3/devtools/loader.js +2 -0
  18. package/dist/addon-mv3/devtools/panel.html +88 -0
  19. package/dist/addon-mv3/devtools/panel.js +148 -0
  20. package/dist/addon-mv3/devtools/panel.ts +145 -0
  21. package/dist/addon-mv3/manifest.json +5 -3
  22. package/dist/addon-mv3/popup.bundle.js +173 -1
  23. package/dist/addon-mv3/popup.html +14 -0
  24. package/dist/addon-mv3/rules.json +183 -42
  25. package/dist/autoconsent.cjs.js +1 -1
  26. package/dist/autoconsent.esm.js +1 -1
  27. package/dist/autoconsent.playwright.js +1 -1
  28. package/lib/cmps/airbnb.ts +4 -0
  29. package/lib/cmps/base.ts +8 -0
  30. package/lib/cmps/consentmanager.ts +4 -0
  31. package/lib/cmps/consentomatic.ts +1 -0
  32. package/lib/cmps/conversant.ts +4 -0
  33. package/lib/cmps/cookiebot.ts +4 -0
  34. package/lib/cmps/evidon.ts +4 -0
  35. package/lib/cmps/klaro.ts +4 -0
  36. package/lib/cmps/onetrust.ts +4 -0
  37. package/lib/cmps/sourcepoint-frame.ts +35 -7
  38. package/lib/cmps/tiktok.ts +4 -0
  39. package/lib/cmps/trustarc-frame.ts +4 -0
  40. package/lib/cmps/trustarc-top.ts +4 -0
  41. package/lib/cmps/uniconsent.ts +4 -0
  42. package/lib/consentomatic/index.ts +12 -12
  43. package/lib/consentomatic/tools.ts +13 -13
  44. package/lib/eval-handler.ts +2 -6
  45. package/lib/messages.ts +44 -13
  46. package/lib/random.ts +6 -0
  47. package/lib/rule-executors.ts +8 -3
  48. package/lib/rules.ts +2 -1
  49. package/lib/types.ts +27 -0
  50. package/lib/web.ts +127 -82
  51. package/package.json +11 -8
  52. package/playwright/runner.ts +1 -0
  53. package/rollup.config.js +18 -5
  54. package/rules/autoconsent/affinity-serif-com.json +1 -4
  55. package/rules/autoconsent/ausopen.json +2 -2
  56. package/rules/autoconsent/baden-wuerttemberg-de.json +1 -0
  57. package/rules/autoconsent/cc-banner.json +1 -0
  58. package/rules/autoconsent/complianz-notice.json +1 -0
  59. package/rules/autoconsent/cookie-notice.json +2 -1
  60. package/rules/autoconsent/cookiealert.json +48 -0
  61. package/rules/autoconsent/dsgvo.json +1 -0
  62. package/rules/autoconsent/eu-cookie-compliance.json +1 -1
  63. package/rules/autoconsent/eu-cookie-law.json +1 -0
  64. package/rules/autoconsent/ezoic.json +1 -0
  65. package/rules/autoconsent/generic-cosmetic.json +9 -0
  66. package/rules/autoconsent/indeed-com.json +9 -0
  67. package/rules/autoconsent/jquery-cookiebar.json +1 -0
  68. package/rules/autoconsent/marksandspencer.json +2 -2
  69. package/rules/autoconsent/notice-cookie.json +1 -0
  70. package/rules/autoconsent/osano.json +1 -0
  71. package/rules/autoconsent/pornhub.json +12 -0
  72. package/rules/autoconsent/uk-cookie-consent.json +1 -0
  73. package/rules/autoconsent/xnxx-com.json +9 -0
  74. package/rules/rules.json +183 -42
  75. package/tests/192.spec.ts +3 -3
  76. package/tests/adroll.spec.ts +7 -7
  77. package/tests/affinity-serif-com.spec.ts +1 -1
  78. package/tests/airbnb.spec.ts +3 -3
  79. package/tests/amazon.spec.ts +8 -8
  80. package/tests/arzt-auskunft.spec.ts +3 -3
  81. package/tests/ausopen.spec.ts +2 -2
  82. package/tests/aws.amazon.spec.ts +3 -3
  83. package/tests/axeptio.spec.ts +3 -3
  84. package/tests/baden-wuerttemberg.spec.ts +3 -3
  85. package/tests/borlabs.spec.ts +4 -4
  86. package/tests/bundesregierung.spec.ts +6 -6
  87. package/tests/ccbanner.spec.ts +4 -4
  88. package/tests/clickio.spec.ts +5 -5
  89. package/tests/complianz-banner.spec.ts +2 -2
  90. package/tests/complianz-categories.spec.ts +5 -5
  91. package/tests/complianz-notice.spec.ts +3 -3
  92. package/tests/complianz-optin.spec.ts +4 -4
  93. package/tests/consentmanager.spec.ts +8 -8
  94. package/tests/conversant.spec.ts +5 -5
  95. package/tests/cookie-notice.spec.ts +5 -3
  96. package/tests/cookiealert.spec.ts +9 -0
  97. package/tests/cookiebot.spec.ts +7 -11
  98. package/tests/cookieinformation.spec.ts +4 -5
  99. package/tests/cookielawinfo.spec.ts +3 -3
  100. package/tests/corona-in-zahlen.spec.ts +3 -3
  101. package/tests/dailymotion.spec.ts +5 -5
  102. package/tests/deepl.spec.ts +3 -3
  103. package/tests/didomi.spec.ts +8 -8
  104. package/tests/dmgmedia.spec.ts +7 -7
  105. package/tests/drupal.spec.ts +3 -3
  106. package/tests/dsgvo.spec.ts +4 -1
  107. package/tests/dunelm.spec.ts +3 -3
  108. package/tests/etsy.spec.ts +2 -2
  109. package/tests/eu-cookie-compliance-banner.spec.ts +2 -2
  110. package/tests/eu-cookie-law.spec.ts +2 -2
  111. package/tests/evidon.spec.ts +4 -6
  112. package/tests/ezoic.spec.ts +2 -3
  113. package/tests/facebook.spec.ts +5 -5
  114. package/tests/fundingchoices.spec.ts +5 -6
  115. package/tests/generic-cosmetic.spec.ts +11 -0
  116. package/tests/google.spec.ts +2 -2
  117. package/tests/gov-uk.spec.ts +4 -4
  118. package/tests/hl-co-uk.spec.ts +3 -3
  119. package/tests/hubspot.spec.ts +2 -2
  120. package/tests/indeed.spec.ts +7 -0
  121. package/tests/ionos.spec.ts +3 -3
  122. package/tests/iubenda.spec.ts +3 -3
  123. package/tests/johnlewis.spec.ts +3 -3
  124. package/tests/jquery-cookiebar.spec.ts +2 -2
  125. package/tests/klaro.spec.ts +5 -5
  126. package/tests/linkedin.spec.ts +2 -2
  127. package/tests/marksandspencer.spec.ts +2 -2
  128. package/tests/mediamarkt.spec.ts +3 -3
  129. package/tests/mediavine.spec.ts +3 -3
  130. package/tests/metoffice-gov-uk.spec.ts +3 -3
  131. package/tests/microsoft.spec.ts +4 -4
  132. package/tests/moneysavingexpert.spec.ts +3 -3
  133. package/tests/monzo-com.spec.ts +1 -1
  134. package/tests/moove.spec.ts +4 -10
  135. package/tests/national-lottery.spec.ts +3 -3
  136. package/tests/netflix.spec.ts +3 -3
  137. package/tests/nhs.spec.ts +3 -3
  138. package/tests/notice-cookie.spec.ts +2 -2
  139. package/tests/obi.spec.ts +3 -3
  140. package/tests/oil.spec.ts +6 -6
  141. package/tests/onetrust.spec.ts +24 -24
  142. package/tests/osano.spec.ts +1 -1
  143. package/tests/otto.spec.ts +3 -3
  144. package/tests/paypal.spec.ts +4 -4
  145. package/tests/pornhub.spec.ts +7 -0
  146. package/tests/primebox.spec.ts +2 -2
  147. package/tests/privacymanager.spec.ts +3 -3
  148. package/tests/pubtech.spec.ts +8 -9
  149. package/tests/quantcast.spec.ts +10 -10
  150. package/tests/reddit.spec.ts +3 -3
  151. package/tests/sibbo.spec.ts +9 -10
  152. package/tests/sirdata.spec.ts +2 -3
  153. package/tests/snigel.spec.ts +3 -3
  154. package/tests/sourcepoint.spec.ts +17 -17
  155. package/tests/springer.spec.ts +6 -6
  156. package/tests/steampowered.spec.ts +3 -3
  157. package/tests/tarteaucitron.spec.ts +4 -4
  158. package/tests/tealium.spec.ts +2 -2
  159. package/tests/termly.spec.ts +4 -4
  160. package/tests/testcmp.spec.ts +1 -1
  161. package/tests/thalia.spec.ts +3 -3
  162. package/tests/thefreedictionary.spec.ts +3 -3
  163. package/tests/tiktok.spec.ts +5 -5
  164. package/tests/trustarc.spec.ts +13 -15
  165. package/tests/twitter.spec.ts +7 -7
  166. package/tests/uk-cookie-consent.spec.ts +3 -3
  167. package/tests/uniconsent.spec.ts +4 -4
  168. package/tests/usercentrics-api.spec.ts +6 -5
  169. package/tests/usercentrics-button.spec.ts +2 -3
  170. package/tests/uswitch.spec.ts +3 -3
  171. package/tests/vodafone.spec.ts +3 -3
  172. package/tests/waitrose.spec.ts +3 -3
  173. package/tests/wetransfer.spec.ts +3 -3
  174. package/tests/wordpressgdpr.spec.ts +3 -3
  175. package/tests/wp-cookie-notice.spec.ts +3 -3
  176. package/tests/xing.spec.ts +4 -4
  177. package/tests/xnxx.spec.ts +8 -0
  178. package/tests/youtube-desktop.spec.ts +2 -4
  179. package/tests/youtube-mobile.spec.ts +3 -3
  180. package/tsconfig.json +2 -1
  181. package/.eslintrc.cjs +0 -14
  182. package/rules/autoconsent/motor-talk-de.json +0 -24
  183. package/tests/motor-talk.spec.ts +0 -7
@@ -1,7 +1,7 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('waitrose.com', [
4
- 'https://waitrose.com'], {
5
- skipRegions: ["US","FR","DE"]
6
- }
4
+ 'https://waitrose.com'], {
5
+ skipRegions: ["US","FR","DE"]
6
+ }
7
7
  );
@@ -1,7 +1,7 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('wetransfer.com', [
4
- 'https://wetransfer.com'], {
5
- skipRegions: ["US", "FR", "DE"]
6
- }
4
+ 'https://wetransfer.com'], {
5
+ skipRegions: ["US", "FR", "DE"]
6
+ }
7
7
  );
@@ -1,8 +1,8 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('com_wordpressgdpr', [
4
- 'https://www.yourpension.gov.uk/',
4
+ 'https://www.yourpension.gov.uk/',
5
5
  ], {
6
- testOptIn: false,
7
- testSelfTest: false,
6
+ testOptIn: false,
7
+ testSelfTest: false,
8
8
  });
@@ -1,8 +1,8 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('WP Cookie Notice for GDPR', [
4
- 'https://veryceleb.com/',
5
- // 'https://nysba.org/', // cloudflare botwall
6
- // 'https://www.independentsentinel.com/', // appears only on user iteraction
4
+ 'https://veryceleb.com/',
5
+ // 'https://nysba.org/', // cloudflare botwall
6
+ // 'https://www.independentsentinel.com/', // appears only on user iteraction
7
7
  ], {}
8
8
  );
@@ -1,8 +1,8 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('xing.com', [
4
- 'https://www.xing.com/start/signup'], {
5
- skipRegions: ["US", "FR", "DE"],
6
- testSelfTest: false
7
- }
4
+ 'https://www.xing.com/start/signup'], {
5
+ skipRegions: ["US", "FR", "DE"],
6
+ testSelfTest: false
7
+ }
8
8
  );
@@ -0,0 +1,8 @@
1
+ import generateCMPTests from "../playwright/runner";
2
+
3
+ generateCMPTests('xnxx-com', [
4
+ 'https://xnxx.com/',
5
+ 'https://xvideos.com/'
6
+ ], {
7
+ onlyRegions: ['US'],
8
+ });
@@ -1,7 +1,5 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
- generateCMPTests('youtube-desktop', [
4
- 'https://youtube.com/',
5
- ],{
6
- skipRegions: ['US']
3
+ generateCMPTests("youtube-desktop", ["https://youtube.com/"], {
4
+ skipRegions: ["US"],
7
5
  });
@@ -1,8 +1,8 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('youtube-mobile', [
4
- 'https://m.youtube.com/',
4
+ 'https://m.youtube.com/',
5
5
  ],{
6
- skipRegions: ['US'],
7
- mobile: true
6
+ skipRegions: ['US'],
7
+ mobile: true
8
8
  });
package/tsconfig.json CHANGED
@@ -9,6 +9,7 @@
9
9
  "exclude": [
10
10
  "node_modules/*",
11
11
  "playwright.config.ts",
12
- "tests/*"
12
+ "tests/*",
13
+ "dist/*"
13
14
  ]
14
15
  }
package/.eslintrc.cjs DELETED
@@ -1,14 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- parser: '@typescript-eslint/parser',
4
- plugins: [
5
- '@typescript-eslint',
6
- ],
7
- extends: [
8
- 'eslint:recommended',
9
- 'plugin:@typescript-eslint/recommended',
10
- ],
11
- rules: {
12
- "@typescript-eslint/no-explicit-any": 0,
13
- }
14
- }
@@ -1,24 +0,0 @@
1
- {
2
- "name": "motor-talk.de",
3
- "prehideSelectors": [".mt-cc-bnnr__wrapper"],
4
- "detectCmp": [
5
- {
6
- "exists": ".mt-cc-bnnr"
7
- }
8
- ],
9
- "detectPopup": [
10
- {
11
- "visible": ".mt-cc-bnnr__wrapper"
12
- }
13
- ],
14
- "optIn": [
15
- {
16
- "click": ".mt-cc-bnnr__button-main"
17
- }
18
- ],
19
- "optOut": [
20
- {
21
- "click": ".mt-cc-bnnr__decline-link"
22
- }
23
- ]
24
- }
@@ -1,7 +0,0 @@
1
- import generateCMPTests from "../playwright/runner";
2
-
3
- generateCMPTests('motor-talk.de', [
4
- 'https://motor-talk.de'], {
5
- skipRegions: ["US", "FR", "GB"]
6
- }
7
- );