@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.
- package/CHANGELOG.md +41 -0
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +1 -63
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rule-index.json +1 -1
- package/dist/addon-firefox/rules.json +1 -1
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +1 -63
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rule-index.json +1 -1
- package/dist/addon-mv3/rules.json +1 -1
- package/dist/autoconsent.cjs.js +1 -63
- package/dist/autoconsent.esm.js +1 -63
- package/dist/autoconsent.playwright.js +1 -63
- package/dist/autoconsent.standalone.js +2 -64
- package/dist/types/cmps/all.d.ts +1 -2
- package/lib/cmps/all.ts +0 -2
- package/lib/heuristic-patterns.ts +1 -1
- package/package.json +1 -1
- package/rules/autoconsent/epidemicsound-com.json +19 -0
- package/rules/autoconsent/godaddy-privacy-widget.json +9 -0
- package/rules/autoconsent/hometogo.json +18 -0
- package/rules/autoconsent/lendable.json +39 -0
- package/rules/autoconsent/massgeneralbrigham.json +35 -0
- package/rules/autoconsent/maticrobots-com.json +17 -0
- package/rules/autoconsent/pandectes.json +4 -2
- package/rules/autoconsent/rdc-concents.json +9 -0
- package/rules/autoconsent/readly.json +26 -17
- package/rules/autoconsent/rspb.json +42 -0
- package/rules/autoconsent/rug-nl.json +33 -0
- package/rules/autoconsent/scmp.json +11 -3
- package/rules/autoconsent/tumblr-com.json +31 -0
- package/rules/autoconsent/tumblr-custom-domain-gdpr-banner.json +32 -0
- package/rules/autoconsent/venngage.json +38 -0
- package/rules/autoconsent/vmock.json +41 -0
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/tests/epidemicsound-com.spec.ts +3 -0
- package/tests/godaddy-privacy-widget.spec.ts +8 -0
- package/tests/hometogo.spec.ts +8 -0
- package/tests/lendable.spec.ts +3 -0
- package/tests/massgeneralbrigham.spec.ts +3 -0
- package/tests/maticrobots-com.spec.ts +3 -0
- package/tests/pandectes.spec.ts +6 -1
- package/tests/rdc-concents.spec.ts +10 -0
- package/tests/readly.spec.ts +1 -1
- package/tests/rspb.spec.ts +3 -0
- package/tests/rug-nl.spec.ts +3 -0
- package/tests/tumblr-custom-domain-gdpr-banner.spec.ts +7 -0
- package/tests/venngage.spec.ts +3 -0
- package/tests/vmock.spec.ts +3 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +7 -0
- package/dist/types/cmps/tumblr-com.d.ts +0 -15
- package/lib/cmps/tumblr-com.ts +0 -70
|
@@ -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 });
|
package/tests/pandectes.spec.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import generateCMPTests from '../playwright/runner';
|
|
2
2
|
|
|
3
|
-
generateCMPTests('pandectes', [
|
|
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
|
+
]);
|
package/tests/readly.spec.ts
CHANGED
|
@@ -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
|
+
);
|
|
@@ -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
|
-
}
|
package/lib/cmps/tumblr-com.ts
DELETED
|
@@ -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
|
-
}
|