@duckduckgo/autoconsent 12.6.0 → 12.7.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 (41) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/addon-firefox/background.bundle.js +0 -1
  3. package/dist/addon-firefox/content.bundle.js +7 -5
  4. package/dist/addon-firefox/manifest.json +1 -1
  5. package/dist/addon-firefox/rules.json +76 -174
  6. package/dist/addon-mv3/background.bundle.js +0 -1
  7. package/dist/addon-mv3/content.bundle.js +7 -5
  8. package/dist/addon-mv3/manifest.json +1 -1
  9. package/dist/addon-mv3/rules.json +76 -174
  10. package/dist/autoconsent.cjs.js +5 -3
  11. package/dist/autoconsent.esm.js +5 -3
  12. package/dist/autoconsent.extra.cjs.js +7 -5
  13. package/dist/autoconsent.extra.esm.js +7 -5
  14. package/dist/autoconsent.playwright.js +83 -179
  15. package/lib/cmps/sourcepoint-frame.ts +11 -3
  16. package/lib/eval-snippets.ts +0 -1
  17. package/lib/filterlist-engine.ts +2 -2
  18. package/package.json +1 -1
  19. package/rules/autoconsent/aa.json +0 -6
  20. package/rules/autoconsent/affinity-serif-com.json +3 -17
  21. package/rules/autoconsent/consent-manager.json +36 -0
  22. package/rules/autoconsent/dpgmedia-nl.json +6 -6
  23. package/rules/autoconsent/ef-ccpa.json +29 -0
  24. package/rules/filterlist.txt +79 -418
  25. package/rules/rules.json +76 -174
  26. package/tests/aa.spec.ts +3 -1
  27. package/tests/admiral.spec.ts +1 -9
  28. package/tests/adroll.spec.ts +0 -2
  29. package/tests/aquasana-com.spec.ts +1 -5
  30. package/tests/consent-manager.spec.ts +3 -0
  31. package/tests/ef-ccpa.spec.ts +3 -0
  32. package/rules/autoconsent/192.json +0 -15
  33. package/rules/autoconsent/1password-com.json +0 -9
  34. package/rules/autoconsent/agolde-com.json +0 -9
  35. package/rules/autoconsent/almacmp.json +0 -13
  36. package/rules/autoconsent/altium-com.json +0 -9
  37. package/tests/192.spec.ts +0 -5
  38. package/tests/1password-com.spec.ts +0 -3
  39. package/tests/agolde-com.spec.ts +0 -3
  40. package/tests/almacmp.spec.ts +0 -3
  41. package/tests/altium-com.spec.ts +0 -3
@@ -37,7 +37,10 @@ export default class SourcePoint extends AutoConsentCMPBase {
37
37
  return true;
38
38
  }
39
39
  return (
40
- (url.pathname === '/index.html' || url.pathname === '/privacy-manager/index.html' || url.pathname === '/ccpa_pm/index.html') &&
40
+ (url.pathname === '/index.html' ||
41
+ url.pathname === '/privacy-manager/index.html' ||
42
+ url.pathname === '/ccpa_pm/index.html' ||
43
+ url.pathname === '/us_pm/index.html') &&
41
44
  (url.searchParams.has('message_id') || url.searchParams.has('requestUUID') || url.searchParams.has('consentUUID'))
42
45
  );
43
46
  }
@@ -92,11 +95,13 @@ export default class SourcePoint extends AutoConsentCMPBase {
92
95
  }
93
96
  return this.click('.priv-save-btn');
94
97
  }
98
+
95
99
  if (!this.isManagerOpen()) {
96
- const actionable = await this.waitForElement('.sp_choice_type_12,.sp_choice_type_13');
100
+ const actionable = await this.waitForVisible('.sp_choice_type_12,.sp_choice_type_13');
97
101
  if (!actionable) {
98
102
  return false;
99
103
  }
104
+
100
105
  if (!this.elementExists('.sp_choice_type_12')) {
101
106
  // do not sell button
102
107
  return this.click('.sp_choice_type_13');
@@ -108,6 +113,9 @@ export default class SourcePoint extends AutoConsentCMPBase {
108
113
  }
109
114
 
110
115
  await this.waitForElement('.type-modal', 20000);
116
+ if (this.elementExists('[role=tablist]')) {
117
+ await this.waitForElement('[role=tablist] [role=tab]', 10000);
118
+ }
111
119
 
112
120
  // check "Do Not Sell" (CCPA) toggle if it exists
113
121
  this.waitForThenClick('.ccpa-stack .pm-switch[aria-checked=true] .slider', 500, true); // the UI is reversed: "unchecked" switch displays as an enabled toggle
@@ -121,6 +129,7 @@ export default class SourcePoint extends AutoConsentCMPBase {
121
129
  this.waitForElement(rejectSelector2, 2000).then((success) => (success ? 1 : -1)),
122
130
  this.waitForElement('.pm-features', 2000).then((success) => (success ? 2 : -1)),
123
131
  ]);
132
+
124
133
  if (path === 0) {
125
134
  await this.waitForVisible(rejectSelector1);
126
135
  return this.click(rejectSelector1);
@@ -129,7 +138,6 @@ export default class SourcePoint extends AutoConsentCMPBase {
129
138
  } else if (path === 2) {
130
139
  await this.waitForElement('.pm-features', 10000);
131
140
  this.click('.checked > span', true);
132
-
133
141
  this.click('.chevron');
134
142
  }
135
143
  } catch (e) {
@@ -64,7 +64,6 @@ export const snippets = {
64
64
  // declarative rules
65
65
  EVAL_ABC_TEST: () => document.cookie.includes('trackingconsent'),
66
66
  EVAL_ADROLL_0: () => !document.cookie.includes('__adroll_fpc'),
67
- EVAL_ALMACMP_0: () => document.cookie.includes('"name":"Google","consent":false'),
68
67
  EVAL_AFFINITY_SERIF_COM_0: () =>
69
68
  document.cookie.includes('serif_manage_cookies_viewed') && !document.cookie.includes('serif_allow_analytics'),
70
69
  EVAL_ARBEITSAGENTUR_TEST: () => document.cookie.includes('cookie_consent=denied'),