@duckduckgo/autoconsent 2.2.0 → 3.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 (74) hide show
  1. package/Jenkinsfile +2 -2
  2. package/dist/addon-firefox/background.bundle.js +1 -1
  3. package/dist/addon-firefox/content.bundle.js +1 -1
  4. package/dist/addon-firefox/manifest.json +2 -2
  5. package/dist/addon-firefox/rules.json +565 -7
  6. package/dist/addon-mv3/background.bundle.js +1 -1
  7. package/dist/addon-mv3/content.bundle.js +1 -1
  8. package/dist/addon-mv3/manifest.json +3 -2
  9. package/dist/addon-mv3/popup.bundle.js +1 -0
  10. package/dist/addon-mv3/popup.html +67 -0
  11. package/dist/addon-mv3/rules.json +565 -7
  12. package/dist/autoconsent.cjs.js +1 -1
  13. package/dist/autoconsent.esm.js +1 -1
  14. package/dist/autoconsent.playwright.js +1 -1
  15. package/lib/cmps/airbnb.ts +57 -0
  16. package/lib/cmps/all.ts +4 -0
  17. package/lib/cmps/base.ts +2 -2
  18. package/lib/cmps/onetrust.ts +3 -3
  19. package/lib/cmps/tiktok.ts +73 -0
  20. package/lib/cmps/trustarc-frame.ts +4 -1
  21. package/lib/cmps/uniconsent.ts +2 -1
  22. package/lib/rule-executors.ts +15 -15
  23. package/lib/rules.ts +1 -1
  24. package/lib/web.ts +14 -1
  25. package/package.json +2 -2
  26. package/playwright/runner.ts +8 -2
  27. package/playwright.config.ts +9 -0
  28. package/readme.md +5 -1
  29. package/rollup.config.js +16 -2
  30. package/rules/autoconsent/amazon.json +20 -0
  31. package/rules/autoconsent/dailymotion.json +22 -0
  32. package/rules/autoconsent/dmgmedia.json +19 -0
  33. package/rules/autoconsent/facebook.json +21 -0
  34. package/rules/autoconsent/google-consent-standalone.json +17 -0
  35. package/rules/autoconsent/google.json +22 -0
  36. package/rules/autoconsent/linkedin.json +23 -0
  37. package/rules/autoconsent/monzo-com.json +1 -6
  38. package/rules/autoconsent/moove.json +1 -1
  39. package/rules/autoconsent/privacymanager.json +30 -0
  40. package/rules/autoconsent/pubtech.json +42 -0
  41. package/rules/autoconsent/reddit.json +22 -0
  42. package/rules/autoconsent/sibbo.json +43 -0
  43. package/rules/autoconsent/twitter.json +22 -0
  44. package/rules/autoconsent/vodafone-de.json +1 -1
  45. package/rules/autoconsent/youtube-desktop.json +23 -0
  46. package/rules/autoconsent/youtube-mobile.json +22 -0
  47. package/rules/rules.json +565 -7
  48. package/tests/airbnb.spec.ts +8 -0
  49. package/tests/amazon.spec.ts +17 -0
  50. package/tests/complianz-banner.spec.ts +0 -2
  51. package/tests/complianz-categories.spec.ts +1 -1
  52. package/tests/dailymotion.spec.ts +14 -0
  53. package/tests/dmgmedia.spec.ts +16 -0
  54. package/tests/facebook.spec.ts +14 -0
  55. package/tests/google.spec.ts +7 -0
  56. package/tests/linkedin.spec.ts +7 -0
  57. package/tests/moove.spec.ts +1 -0
  58. package/tests/oil.spec.ts +3 -2
  59. package/tests/onetrust.spec.ts +2 -2
  60. package/tests/privacymanager.spec.ts +8 -0
  61. package/tests/pubtech.spec.ts +13 -0
  62. package/tests/reddit.spec.ts +8 -0
  63. package/tests/sibbo.spec.ts +15 -0
  64. package/tests/tiktok.spec.ts +14 -0
  65. package/tests/twitter.spec.ts +16 -0
  66. package/tests/wp-cookie-notice.spec.ts +1 -1
  67. package/tests/youtube-desktop.spec.ts +7 -0
  68. package/tests/youtube-mobile.spec.ts +8 -0
  69. package/.vscode/.idea/.vscode.iml +0 -9
  70. package/.vscode/.idea/modules.xml +0 -8
  71. package/.vscode/.idea/workspace.xml +0 -28
  72. package/.vscode/settings.json +0 -7
  73. package/lib/web/consentomatic/index.js +0 -188
  74. package/lib/web/consentomatic/tools.js +0 -177
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "twitter",
3
+ "runContext": {
4
+ "urlPattern": "^https://([a-z0-9-]+\\.)?twitter\\.com/"
5
+ },
6
+ "prehideSelectors": ["[data-testid=\"BottomBar\"]"],
7
+ "detectCmp": [
8
+ { "exists": "[data-testid=\"BottomBar\"] div" }
9
+ ],
10
+ "detectPopup": [
11
+ { "visible": "[data-testid=\"BottomBar\"] div" }
12
+ ],
13
+ "optIn": [
14
+ { "waitForThenClick": "[data-testid=\"BottomBar\"] > div:has(>div:first-child>div:last-child>span[role=button]) > div:last-child > div[role=button]:first-child" }
15
+ ],
16
+ "optOut": [
17
+ { "waitForThenClick": "[data-testid=\"BottomBar\"] > div:has(>div:first-child>div:last-child>span[role=button]) > div:last-child > div[role=button]:last-child" }
18
+ ],
19
+ "TODOtest": [
20
+ { "eval": "document.cookie.includes('d_prefs=MjoxLGNvbnNlbnRfdmVyc2lvbjoy')" }
21
+ ]
22
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vodafone.de",
3
3
  "runContext": {
4
- "url": "https://www.vodafone.de/"
4
+ "urlPattern": "^https://www\\.vodafone\\.de/"
5
5
  },
6
6
  "prehideSelectors": [".dip-consent,.dip-consent-container"],
7
7
  "detectCmp": [{ "exists": ".dip-consent-container" }],
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "youtube-desktop",
3
+ "prehideSelectors": ["tp-yt-iron-overlay-backdrop.opened", "ytd-consent-bump-v2-lightbox"],
4
+ "detectCmp": [
5
+ { "exists": "ytd-consent-bump-v2-lightbox tp-yt-paper-dialog" },
6
+ { "exists": "ytd-consent-bump-v2-lightbox tp-yt-paper-dialog a[href^=\"https://consent.youtube.com/\"]" }
7
+ ],
8
+ "detectPopup": [
9
+ { "visible": "ytd-consent-bump-v2-lightbox tp-yt-paper-dialog" }
10
+ ],
11
+ "optIn": [
12
+ { "waitForThenClick": "ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:last-child #button,ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:last-child button" },
13
+ { "wait": 500 }
14
+ ],
15
+ "optOut": [
16
+ { "waitForThenClick": "ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:first-child #button,ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:first-child button" },
17
+ { "wait": 500 }
18
+ ],
19
+ "test": [
20
+ { "wait": 500 },
21
+ { "eval": "!!document.cookie.match(/SOCS=CAE/)" }
22
+ ]
23
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "youtube-mobile",
3
+ "prehideSelectors": [".consent-bump-v2-lightbox"],
4
+ "detectCmp": [
5
+ { "exists": "ytm-consent-bump-v2-renderer" }
6
+ ],
7
+ "detectPopup": [
8
+ { "visible": "ytm-consent-bump-v2-renderer" }
9
+ ],
10
+ "optIn": [
11
+ { "waitForThenClick": "ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons c3-material-button:first-child button, ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons ytm-button-renderer:first-child button" },
12
+ { "wait": 500 }
13
+ ],
14
+ "optOut": [
15
+ { "waitForThenClick": "ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons c3-material-button:nth-child(2) button, ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons ytm-button-renderer:nth-child(2) button" },
16
+ { "wait": 500 }
17
+ ],
18
+ "test": [
19
+ { "wait": 500 },
20
+ { "eval": "!!document.cookie.match(/SOCS=CAE/)" }
21
+ ]
22
+ }