@duckduckgo/autoconsent 17.0.0 → 17.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.
- package/CHANGELOG.md +57 -0
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +15 -3
- 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 +15 -3
- 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 +15 -3
- package/dist/autoconsent.esm.js +15 -3
- package/dist/autoconsent.playwright.js +15 -3
- package/dist/autoconsent.standalone.js +16 -4
- package/dist/heuristics.cjs.js +15 -3
- package/dist/heuristics.mjs +15 -3
- package/lib/heuristic-patterns.ts +18 -2
- package/package.json +1 -1
- package/rules/autoconsent/1pmobile.json +44 -0
- package/rules/autoconsent/amasty-gdpr-hyva.json +131 -0
- package/rules/autoconsent/amazonforum.json +86 -0
- package/rules/autoconsent/babylist.json +23 -0
- package/rules/autoconsent/babylonbee.json +36 -0
- package/rules/autoconsent/bathnes-cookie-banner.json +31 -0
- package/rules/autoconsent/chairish.json +17 -0
- package/rules/autoconsent/chemicalbook.json +13 -0
- package/rules/autoconsent/chimnie-co-uk.json +21 -0
- package/rules/autoconsent/complianz-optin.json +5 -3
- package/rules/autoconsent/cookie-pref-form.json +48 -0
- package/rules/autoconsent/endeavorhealth.json +31 -0
- package/rules/autoconsent/ensighten.json +3 -3
- package/rules/autoconsent/fepblue-org.json +13 -0
- package/rules/autoconsent/fpl-com.json +34 -0
- package/rules/autoconsent/fuqer.json +11 -0
- package/rules/autoconsent/greatschools.json +13 -0
- package/rules/autoconsent/hamradio-com.json +13 -0
- package/rules/autoconsent/hubspot.json +7 -1
- package/rules/autoconsent/ibkr.json +16 -0
- package/rules/autoconsent/jetpens.json +44 -0
- package/rules/autoconsent/kanopy.json +88 -0
- package/rules/autoconsent/mainlinemenswear.json +39 -0
- package/rules/autoconsent/money-co-uk.json +21 -0
- package/rules/autoconsent/myjobquote.json +19 -0
- package/rules/autoconsent/northwell-edu.json +29 -0
- package/rules/autoconsent/nts-org-uk.json +20 -0
- package/rules/autoconsent/nyu-langone.json +30 -0
- package/rules/autoconsent/ofsted-reports-cosmetic.json +13 -0
- package/rules/autoconsent/optum-legal-banner.json +10 -0
- package/rules/autoconsent/optum.json +35 -0
- package/rules/autoconsent/planned-parenthood.json +17 -0
- package/rules/autoconsent/pornhub-compact-cookie-banner.json +1 -1
- package/rules/autoconsent/pornhub.json +1 -1
- package/rules/autoconsent/reviewsolicitors.json +41 -0
- package/rules/autoconsent/ring.json +1 -1
- package/rules/autoconsent/sankei-digital.json +37 -0
- package/rules/autoconsent/texas-gov.json +22 -0
- package/rules/autoconsent/tiresize.com.json +17 -0
- package/rules/autoconsent/trillian.json +10 -0
- package/rules/autoconsent/tyreseeker.json +44 -0
- package/rules/autoconsent/uhcprovider.json +13 -0
- package/rules/autoconsent/united-online.json +66 -0
- package/rules/autoconsent/unitedutilities.json +52 -0
- package/rules/autoconsent/uttings.co.uk.json +22 -0
- package/rules/autoconsent/watchfinder.json +16 -0
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/tests/1pmobile.spec.ts +5 -0
- package/tests/amasty-gdpr-hyva.spec.ts +17 -0
- package/tests/amazonforum.spec.ts +9 -0
- package/tests/babylist.spec.ts +3 -0
- package/tests/babylonbee.spec.ts +6 -0
- package/tests/bathnes-cookie-banner.spec.ts +3 -0
- package/tests/chairish.spec.ts +3 -0
- package/tests/chemicalbook.spec.ts +5 -0
- package/tests/chimnie-co-uk.spec.ts +3 -0
- package/tests/complianz-optin.spec.ts +2 -0
- package/tests/cookie-pref-form.spec.ts +8 -0
- package/tests/endeavorhealth.spec.ts +3 -0
- package/tests/ensighten.spec.ts +7 -1
- package/tests/fepblue-org.spec.ts +3 -0
- package/tests/fpl-com.spec.ts +3 -0
- package/tests/fuqer.spec.ts +3 -0
- package/tests/greatschools.spec.ts +3 -0
- package/tests/hamradio-com.spec.ts +3 -0
- package/tests/hubspot.spec.ts +6 -1
- package/tests/ibkr.spec.ts +18 -0
- package/tests/jetpens.spec.ts +5 -0
- package/tests/kanopy.spec.ts +5 -0
- package/tests/mainlinemenswear.spec.ts +3 -0
- package/tests/money-co-uk.spec.ts +3 -0
- package/tests/myjobquote.spec.ts +5 -0
- package/tests/northwell-edu.spec.ts +3 -0
- package/tests/nts-org-uk.spec.ts +3 -0
- package/tests/nyu-langone.spec.ts +3 -0
- package/tests/ofsted-reports-cosmetic.spec.ts +3 -0
- package/tests/optum-legal-banner.spec.ts +9 -0
- package/tests/optum.spec.ts +6 -0
- package/tests/planned-parenthood.spec.ts +3 -0
- package/tests/pornhub.spec.ts +1 -1
- package/tests/reviewsolicitors.spec.ts +3 -0
- package/tests/sankei-digital.spec.ts +9 -0
- package/tests/texas-gov.spec.ts +3 -0
- package/tests/tiresize.com.spec.ts +3 -0
- package/tests/trillian.spec.ts +15 -0
- package/tests/tyreseeker.spec.ts +3 -0
- package/tests/uhcprovider.spec.ts +3 -0
- package/tests/united-online.spec.ts +4 -0
- package/tests/unitedutilities.spec.ts +11 -0
- package/tests/uttings.co.uk.spec.ts +3 -0
- package/tests/watchfinder.spec.ts +3 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +34 -4
- package/rules/generated/auto_US_interactivebrokers.com_0.json +0 -28
- package/tests/generated/auto_US_interactivebrokers.com_0.spec.ts +0 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
generateCMPTests('amasty-gdpr-hyva', [
|
|
4
|
+
'http://stovesareus.co.uk/',
|
|
5
|
+
'https://www.strunz.com/',
|
|
6
|
+
'https://www.agri-expert.fr/',
|
|
7
|
+
'https://www.sigma-foto.de/',
|
|
8
|
+
'https://www.drankgigant.nl/',
|
|
9
|
+
'https://www.biocare.co.uk/',
|
|
10
|
+
'https://www.wrendaledesigns.co.uk/',
|
|
11
|
+
'https://www.snaintongolf.co.uk/',
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
// no banner shown in the US
|
|
15
|
+
generateCMPTests('amasty-gdpr-hyva', ['https://www.brisa.fi/'], {
|
|
16
|
+
skipRegions: ['US'],
|
|
17
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
// the dismiss-only notice is shown outside GDPR regions; those get a banner with "Reject all", handled by the heuristic
|
|
4
|
+
generateCMPTests('babylonbee', ['https://babylonbee.com/'], {
|
|
5
|
+
onlyRegions: ['US', 'CA', 'AU', 'JP'],
|
|
6
|
+
});
|
|
@@ -7,6 +7,8 @@ generateCMPTests(
|
|
|
7
7
|
// 'https://marahoffman.com/', // no longer shows the banner
|
|
8
8
|
'https://aktienfinder.net/',
|
|
9
9
|
'https://www.rnoh.nhs.uk/',
|
|
10
|
+
// popup must be fully faded in before the click, and stays clickable at opacity 0 unless hidden
|
|
11
|
+
'https://www.rogercastillo.org/',
|
|
10
12
|
// Securiti flavor: no reject button, opt out via the preference center
|
|
11
13
|
'https://www.jbhunt.com/',
|
|
12
14
|
],
|
package/tests/ensighten.spec.ts
CHANGED
|
@@ -2,7 +2,13 @@ import generateCMPTests from '../playwright/runner';
|
|
|
2
2
|
|
|
3
3
|
generateCMPTests(
|
|
4
4
|
'Ensighten',
|
|
5
|
-
[
|
|
5
|
+
[
|
|
6
|
+
'https://www.audi.ca/en/',
|
|
7
|
+
'https://www.volkswagen.de/',
|
|
8
|
+
'https://de.rs-online.com/',
|
|
9
|
+
'https://www.easyjet.com/',
|
|
10
|
+
'https://jp.norton.com/',
|
|
11
|
+
],
|
|
6
12
|
{
|
|
7
13
|
skipRegions: ['US'],
|
|
8
14
|
},
|
package/tests/hubspot.spec.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import generateCMPTests from '../playwright/runner';
|
|
2
2
|
|
|
3
|
-
generateCMPTests('hubspot', ['https://blog.hubspot.com/', 'https://www.hubspot.de/']);
|
|
3
|
+
generateCMPTests('hubspot', ['https://blog.hubspot.com/', 'https://www.hubspot.de/', 'https://www.aafp.org/']);
|
|
4
|
+
|
|
5
|
+
// notice-only flavor without a decline button
|
|
6
|
+
generateCMPTests('hubspot', ['https://www.hancockwhitney.com/'], {
|
|
7
|
+
onlyRegions: ['US'],
|
|
8
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
// saving consent reloads the page, so the self-test runs before the cookie is set
|
|
4
|
+
const options = { testSelfTest: false };
|
|
5
|
+
|
|
6
|
+
generateCMPTests('ibkr', ['https://ibtweet.com/', 'https://clientam.co.uk/', 'https://interactivevp.com/'], options);
|
|
7
|
+
|
|
8
|
+
// EEA visitors get a region selection dialog before the cookie modal
|
|
9
|
+
generateCMPTests('ibkr', ['https://www.interactivebrokers.com/'], {
|
|
10
|
+
...options,
|
|
11
|
+
onlyRegions: ['US'],
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// variant with a "Reject All Cookies" button
|
|
15
|
+
generateCMPTests('ibkr', ['https://www.interactivebrokers.ie/'], {
|
|
16
|
+
...options,
|
|
17
|
+
onlyRegions: ['DE'],
|
|
18
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
generateCMPTests(
|
|
4
|
+
'optum-legal-banner',
|
|
5
|
+
['https://www.optumrx.com/', 'https://www.optumbank.com/', 'https://www.genoahealthcare.com/', 'https://www.uhchousecalls.com/'],
|
|
6
|
+
{
|
|
7
|
+
testOptIn: false,
|
|
8
|
+
},
|
|
9
|
+
);
|
package/tests/pornhub.spec.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import generateCMPTests from '../playwright/runner';
|
|
2
2
|
|
|
3
|
-
generateCMPTests('pornhub.com', ['https://pornhub.com/', 'https://fr.pornhub.com/'], {
|
|
3
|
+
generateCMPTests('pornhub.com', ['https://pornhub.com/', 'https://fr.pornhub.com/', 'https://de.pornhub.org/'], {
|
|
4
4
|
expectedRuns: 2,
|
|
5
5
|
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
generateCMPTests(
|
|
4
|
+
'trillian',
|
|
5
|
+
[
|
|
6
|
+
'https://www.ouh.nhs.uk/',
|
|
7
|
+
'https://www.sexualhealthoxfordshire.nhs.uk/',
|
|
8
|
+
'https://www.healthinnovationoxford.org/',
|
|
9
|
+
'https://www.thehilloxford.org/',
|
|
10
|
+
],
|
|
11
|
+
{
|
|
12
|
+
// the page reloads after a choice, so the self-test message is lost
|
|
13
|
+
testSelfTest: false,
|
|
14
|
+
},
|
|
15
|
+
);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
generateCMPTests('united-online', ['https://my.juno.com/start/sp.do', 'https://my.netzero.net/start/sp.do'], { mobile: false });
|
|
4
|
+
generateCMPTests('united-online', ['https://webmail.juno.com/', 'https://webmail.netzero.net/'], { mobile: true });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
// saving preferences reloads the page, so the self-test cannot run
|
|
4
|
+
generateCMPTests('unitedutilities', ['https://www.unitedutilities.com/'], {
|
|
5
|
+
testSelfTest: false,
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
generateCMPTests('unitedutilities', ['https://www.unitedutilities.com/'], {
|
|
9
|
+
testSelfTest: false,
|
|
10
|
+
mobile: true,
|
|
11
|
+
});
|
|
@@ -75,7 +75,7 @@ describe('checkHeuristicPatterns', () => {
|
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
-
describe('checkHeuristicPatterns with
|
|
78
|
+
describe('checkHeuristicPatterns with qualifiers before "cookies"', () => {
|
|
79
79
|
it('detects "we use <qualifier> cookies" notices', () => {
|
|
80
80
|
const texts = [
|
|
81
81
|
// openrouter.ai
|
|
@@ -83,6 +83,8 @@ describe('checkHeuristicPatterns with a qualifier before "cookies"', () => {
|
|
|
83
83
|
'We use optional cookies to measure traffic',
|
|
84
84
|
'We use analytics cookies and similar technologies',
|
|
85
85
|
'We serve necessary cookies only',
|
|
86
|
+
'We use Google Analytics cookies to understand which pages and tools are useful.',
|
|
87
|
+
'We use third party cookies for advertising',
|
|
86
88
|
];
|
|
87
89
|
for (const text of texts) {
|
|
88
90
|
expect(checkHeuristicPatterns(text).patterns.length, text).to.be.greaterThan(0);
|
|
@@ -90,9 +92,9 @@ describe('checkHeuristicPatterns with a qualifier before "cookies"', () => {
|
|
|
90
92
|
});
|
|
91
93
|
|
|
92
94
|
it('does not match when "cookies" is further away', () => {
|
|
93
|
-
expect(
|
|
94
|
-
0,
|
|
95
|
-
);
|
|
95
|
+
expect(
|
|
96
|
+
checkHeuristicPatterns('We use the best chocolate in our cookies', [/we (?:use|serve)(?: \w+){0,2} cookies/gi]).patterns,
|
|
97
|
+
).to.have.length(0);
|
|
96
98
|
});
|
|
97
99
|
});
|
|
98
100
|
|
|
@@ -195,6 +197,23 @@ describe('checkHeuristicPatterns with Danish popups', () => {
|
|
|
195
197
|
});
|
|
196
198
|
});
|
|
197
199
|
|
|
200
|
+
describe('checkHeuristicPatterns with Norwegian popups', () => {
|
|
201
|
+
it('detects Norwegian cookie notices', () => {
|
|
202
|
+
const texts = [
|
|
203
|
+
'Kan vi bruke valgfrie informasjonskapsler for å forbedre tjenestene våre?',
|
|
204
|
+
'Vi bruker informasjonskapsler for å gi deg en bedre opplevelse.',
|
|
205
|
+
'Nettstedet bruker cookies til statistikk.',
|
|
206
|
+
];
|
|
207
|
+
for (const text of texts) {
|
|
208
|
+
expect(checkHeuristicPatterns(text).patterns.length, text).to.be.greaterThan(0);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
it('does not detect unrelated Norwegian text', () => {
|
|
213
|
+
expect(checkHeuristicPatterns('Vi bruker skattemeldingen til å beregne skatten din').patterns).to.have.length(0);
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
|
|
198
217
|
describe('isExcludedPopup', () => {
|
|
199
218
|
it('flags doublelist-style age verification popups', () => {
|
|
200
219
|
// Real-world text from the doublelist.com age gate (listings page)
|
|
@@ -349,6 +368,17 @@ describe('classifyButtonTextRegex', () => {
|
|
|
349
368
|
expect(classifyButtonTextRegex('Læs mere om brugen af cookies på sundhed.dk')).not.to.equal('reject');
|
|
350
369
|
});
|
|
351
370
|
|
|
371
|
+
it('matches Norwegian reject buttons', () => {
|
|
372
|
+
expect(classifyButtonTextRegex('Nei')).to.equal('reject');
|
|
373
|
+
expect(classifyButtonTextRegex('Nei takk')).to.equal('reject');
|
|
374
|
+
expect(classifyButtonTextRegex('Avvis alle')).to.equal('reject');
|
|
375
|
+
expect(classifyButtonTextRegex('Avslå')).to.equal('reject');
|
|
376
|
+
expect(classifyButtonTextRegex('Godta kun nødvendige')).to.equal('reject');
|
|
377
|
+
expect(classifyButtonTextRegex('Bare nødvendige informasjonskapsler')).to.equal('reject');
|
|
378
|
+
expect(classifyButtonTextRegex('Ja')).not.to.equal('reject');
|
|
379
|
+
expect(classifyButtonTextRegex('Les mer om hvordan vi bruker informasjonskapsler')).not.to.equal('reject');
|
|
380
|
+
});
|
|
381
|
+
|
|
352
382
|
it('matches Russian settings buttons', () => {
|
|
353
383
|
expect(classifyButtonTextRegex('Настроить')).to.equal('settings');
|
|
354
384
|
expect(classifyButtonTextRegex('Настройки')).to.equal('settings');
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "auto_US_interactivebrokers.com_0",
|
|
3
|
-
"vendorUrl": "https://www.interactivebrokers.com/",
|
|
4
|
-
"cosmetic": false,
|
|
5
|
-
"runContext": {
|
|
6
|
-
"main": true,
|
|
7
|
-
"frame": false,
|
|
8
|
-
"urlPattern": "^https?://(www\\.)?interactivebrokers\\.com/"
|
|
9
|
-
},
|
|
10
|
-
"prehideSelectors": [],
|
|
11
|
-
"detectCmp": [
|
|
12
|
-
{
|
|
13
|
-
"exists": "body > div[class][id][tabindex][role][aria-labelledby][aria-modal][style] > div > div > div:nth-child(3) > div > div > p > button:nth-child(3)"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"detectPopup": [
|
|
17
|
-
{
|
|
18
|
-
"visible": "body > div[class][id][tabindex][role][aria-labelledby][aria-modal][style] > div > div > div:nth-child(3) > div > div > p > button:nth-child(3)"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"optIn": [],
|
|
22
|
-
"optOut": [
|
|
23
|
-
{
|
|
24
|
-
"waitForThenClick": "body > div[class][id][tabindex][role][aria-labelledby][aria-modal][style] > div > div > div:nth-child(3) > div > div > p > button:nth-child(3)",
|
|
25
|
-
"text": "Reject All Cookies"
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|