@duckduckgo/autoconsent 16.38.0 → 16.40.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 (55) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/addon-firefox/compact-rules.json +1 -1
  3. package/dist/addon-firefox/content.bundle.js +1 -63
  4. package/dist/addon-firefox/manifest.json +1 -1
  5. package/dist/addon-firefox/rule-index.json +1 -1
  6. package/dist/addon-firefox/rules.json +1 -1
  7. package/dist/addon-mv3/compact-rules.json +1 -1
  8. package/dist/addon-mv3/content.bundle.js +1 -63
  9. package/dist/addon-mv3/manifest.json +1 -1
  10. package/dist/addon-mv3/rule-index.json +1 -1
  11. package/dist/addon-mv3/rules.json +1 -1
  12. package/dist/autoconsent.cjs.js +1 -63
  13. package/dist/autoconsent.esm.js +1 -63
  14. package/dist/autoconsent.playwright.js +1 -63
  15. package/dist/autoconsent.standalone.js +2 -64
  16. package/dist/types/cmps/all.d.ts +1 -2
  17. package/lib/cmps/all.ts +0 -2
  18. package/lib/heuristic-patterns.ts +1 -1
  19. package/package.json +1 -1
  20. package/rules/autoconsent/epidemicsound-com.json +19 -0
  21. package/rules/autoconsent/godaddy-privacy-widget.json +9 -0
  22. package/rules/autoconsent/hometogo.json +18 -0
  23. package/rules/autoconsent/lendable.json +39 -0
  24. package/rules/autoconsent/massgeneralbrigham.json +35 -0
  25. package/rules/autoconsent/maticrobots-com.json +17 -0
  26. package/rules/autoconsent/pandectes.json +4 -2
  27. package/rules/autoconsent/rdc-concents.json +9 -0
  28. package/rules/autoconsent/readly.json +26 -17
  29. package/rules/autoconsent/rspb.json +42 -0
  30. package/rules/autoconsent/rug-nl.json +33 -0
  31. package/rules/autoconsent/scmp.json +11 -3
  32. package/rules/autoconsent/tumblr-com.json +31 -0
  33. package/rules/autoconsent/tumblr-custom-domain-gdpr-banner.json +32 -0
  34. package/rules/autoconsent/venngage.json +38 -0
  35. package/rules/autoconsent/vmock.json +41 -0
  36. package/rules/compact-rules.json +1 -1
  37. package/rules/rule-index.json +1 -1
  38. package/rules/rules.json +1 -1
  39. package/tests/epidemicsound-com.spec.ts +3 -0
  40. package/tests/godaddy-privacy-widget.spec.ts +8 -0
  41. package/tests/hometogo.spec.ts +8 -0
  42. package/tests/lendable.spec.ts +3 -0
  43. package/tests/massgeneralbrigham.spec.ts +3 -0
  44. package/tests/maticrobots-com.spec.ts +3 -0
  45. package/tests/pandectes.spec.ts +6 -1
  46. package/tests/rdc-concents.spec.ts +10 -0
  47. package/tests/readly.spec.ts +1 -1
  48. package/tests/rspb.spec.ts +3 -0
  49. package/tests/rug-nl.spec.ts +3 -0
  50. package/tests/tumblr-custom-domain-gdpr-banner.spec.ts +7 -0
  51. package/tests/venngage.spec.ts +3 -0
  52. package/tests/vmock.spec.ts +3 -0
  53. package/tests-wtr/heuristics/heuristics-utils.test.ts +7 -0
  54. package/dist/types/cmps/tumblr-com.d.ts +0 -15
  55. package/lib/cmps/tumblr-com.ts +0 -70
@@ -0,0 +1,3 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('epidemicsound.com', ['https://www.epidemicsound.com/'], {});
@@ -0,0 +1,8 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('godaddy-privacy-widget', [
4
+ 'https://sitecheck.sucuri.net/',
5
+ 'https://trodomains.co.uk/',
6
+ 'https://www.hosting-options.co.uk/',
7
+ 'https://www.my-domains.co.uk/',
8
+ ]);
@@ -0,0 +1,8 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ // hometogo.com serves a banner with an explicit reject button; the other HomeToGo Group
4
+ // brands only offer "Cookie settings", so the reject path goes through the settings modal.
5
+ const urls = ['https://www.hometogo.com/', 'https://www.casamundo.com/', 'https://www.hometogo.de/'];
6
+
7
+ generateCMPTests('hometogo', urls, { mobile: false });
8
+ generateCMPTests('hometogo', urls, { mobile: true });
@@ -0,0 +1,3 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('lendable', ['https://www.lendable.co.uk/', 'https://asda.lendable.co.uk/login']);
@@ -0,0 +1,3 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('massgeneralbrigham', ['https://www.massgeneralbrigham.org/en/about/newsroom', 'https://news.massgeneralbrigham.org/']);
@@ -0,0 +1,3 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('maticrobots-com', ['https://maticrobots.com/'], {});
@@ -1,3 +1,8 @@
1
1
  import generateCMPTests from '../playwright/runner';
2
2
 
3
- generateCMPTests('pandectes', ['https://hollandscountryclothing.co.uk/', 'https://cluse.com/', 'https://www.parent.com/']);
3
+ generateCMPTests('pandectes', [
4
+ 'https://hollandscountryclothing.co.uk/',
5
+ 'https://cluse.com/',
6
+ 'https://www.parent.com/',
7
+ 'https://swedishstockings.com/', // full-page overlay ("blocking") banner variant
8
+ ]);
@@ -0,0 +1,10 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('rdc-concents', [
4
+ 'https://www.lemonjelly.com/en/',
5
+ 'https://www.mascarilha.pt/pt/',
6
+ 'https://www.maxmat.pt/pt/',
7
+ 'https://www.jom.pt/pt/',
8
+ // modal (rdc-layout-1) variant
9
+ 'https://www.decenio.com/pt/',
10
+ ]);
@@ -1,3 +1,3 @@
1
1
  import generateCMPTests from '../playwright/runner';
2
2
 
3
- generateCMPTests('readly', ['https://go.readly.com/discover'], {});
3
+ generateCMPTests('readly', ['https://go.readly.com/discover', 'https://www.readly.co/de/offers', 'https://www.readly.co/fr/offers'], {});
@@ -0,0 +1,3 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('rspb.org.uk', ['https://www.rspb.org.uk/', 'https://www.rspb.org.uk/birds-and-wildlife']);
@@ -0,0 +1,3 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('rug-nl', ['https://www.rug.nl/ggdc/productivity/pwt/?lang=en', 'https://www.rug.nl/library/']);
@@ -0,0 +1,7 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests(
4
+ 'tumblr-custom-domain-gdpr-banner',
5
+ ['https://scumbagsandcavaliers.com/', 'https://pauldolgov.com/', 'https://giantcypress.net/', 'https://loveform.com/'],
6
+ { mobile: true, onlyRegions: ['CA'], testOptIn: false },
7
+ );
@@ -0,0 +1,3 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('venngage.com', ['https://venngage.com/tools/accessible-color-palette-generator', 'https://infograph.venngage.com/']);
@@ -0,0 +1,3 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('vmock', ['https://www.vmock.com/', 'https://www.vmock.com/bu/']);
@@ -182,6 +182,13 @@ describe('classifyButtonTextRegex', () => {
182
182
  expect(classifyButtonTextRegex('I do not accept the use of cookies')).to.equal('reject');
183
183
  });
184
184
 
185
+ it('matches German continue-without-accepting variants', () => {
186
+ expect(classifyButtonTextRegex('Ohne Akzeptieren fortfahren')).to.equal('reject');
187
+ expect(classifyButtonTextRegex('Ohne zu akzeptieren fortfahren')).to.equal('reject');
188
+ expect(classifyButtonTextRegex('Weiter ohne Zustimmung')).to.equal('reject');
189
+ expect(classifyButtonTextRegex('Cookies akzeptieren')).to.equal('accept');
190
+ });
191
+
185
192
  it('returns other for empty string', () => {
186
193
  expect(classifyButtonTextRegex('')).to.equal('other');
187
194
  });
@@ -1,15 +0,0 @@
1
- import AutoConsentCMPBase from './base';
2
- export default class Tumblr extends AutoConsentCMPBase {
3
- name: string;
4
- runContext: {
5
- urlPattern: string;
6
- };
7
- get hasSelfTest(): boolean;
8
- get isIntermediate(): boolean;
9
- get isCosmetic(): boolean;
10
- get prehideSelectors(): string[];
11
- detectCmp(): Promise<boolean>;
12
- detectPopup(): Promise<boolean>;
13
- optOut(): Promise<boolean>;
14
- optIn(): Promise<boolean>;
15
- }
@@ -1,70 +0,0 @@
1
- import { waitFor } from '../utils';
2
- import AutoConsentCMPBase from './base';
3
-
4
- export default class Tumblr extends AutoConsentCMPBase {
5
- name = 'tumblr-com';
6
- runContext = {
7
- urlPattern: '^https://(www\\.)?tumblr\\.com/',
8
- };
9
-
10
- get hasSelfTest(): boolean {
11
- return false;
12
- }
13
-
14
- get isIntermediate(): boolean {
15
- return false;
16
- }
17
-
18
- get isCosmetic(): boolean {
19
- return false;
20
- }
21
-
22
- get prehideSelectors(): string[] {
23
- return ['#cmp-app-container'];
24
- }
25
-
26
- async detectCmp() {
27
- return this.elementExists('#cmp-app-container');
28
- }
29
-
30
- async detectPopup() {
31
- return this.elementVisible('#cmp-app-container', 'any');
32
- }
33
-
34
- async optOut() {
35
- let iframe: HTMLIFrameElement | null = document.querySelector('#cmp-app-container iframe');
36
- let settingsButton: HTMLElement | null | undefined = iframe?.contentDocument?.querySelector('.cmp-components-button.is-secondary');
37
- if (!settingsButton) {
38
- return false;
39
- }
40
- settingsButton.click();
41
- await waitFor(
42
- () => {
43
- const iframe: HTMLIFrameElement | null = document.querySelector('#cmp-app-container iframe');
44
- return !!iframe?.contentDocument?.querySelector('.cmp__dialog input');
45
- },
46
- 5,
47
- 500,
48
- );
49
-
50
- // it's a different button now
51
- iframe = document.querySelector('#cmp-app-container iframe');
52
- settingsButton = iframe?.contentDocument?.querySelector('.cmp-components-button.is-secondary');
53
- if (!settingsButton) {
54
- return false;
55
- }
56
- settingsButton.click();
57
- return true;
58
- }
59
-
60
- async optIn() {
61
- const iframe: HTMLIFrameElement | null = document.querySelector('#cmp-app-container iframe');
62
- const acceptButton: HTMLButtonElement | null | undefined =
63
- iframe?.contentDocument?.querySelector('.cmp-components-button.is-primary');
64
- if (acceptButton) {
65
- acceptButton.click();
66
- return true;
67
- }
68
- return false;
69
- }
70
- }