@duckduckgo/autoconsent 16.62.0 → 16.63.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 +43 -0
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +14 -1
- 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 +14 -1
- 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 +14 -1
- package/dist/autoconsent.esm.js +14 -1
- package/dist/autoconsent.playwright.js +14 -1
- package/dist/autoconsent.standalone.js +15 -2
- package/dist/heuristics.cjs.js +14 -1
- package/dist/heuristics.mjs +14 -1
- package/lib/heuristic-patterns.ts +17 -1
- package/package.json +2 -2
- package/rules/autoconsent/appconsent-legacy.json +22 -1
- package/rules/autoconsent/beetle-tracking.json +22 -0
- package/rules/autoconsent/casier-judiciaire-justice-gouv-fr.json +40 -0
- package/rules/autoconsent/civilservicejobs-service-gov-uk.json +38 -0
- package/rules/autoconsent/ckies.json +1 -1
- package/rules/autoconsent/cookiesinfo-closecookies.json +9 -0
- package/rules/autoconsent/dack365.json +35 -0
- package/rules/autoconsent/eu-cookie-law-popup.json +33 -0
- package/rules/autoconsent/fascicolosanitario-lombardia.json +14 -0
- package/rules/autoconsent/fundingchoices.json +12 -2
- package/rules/autoconsent/hyrabostad.json +21 -0
- package/rules/autoconsent/insided.json +15 -0
- package/rules/autoconsent/kartverket.json +46 -0
- package/rules/autoconsent/luxmed.json +33 -0
- package/rules/autoconsent/meta-cookie-dialog.json +37 -0
- package/rules/autoconsent/mittanbud.json +33 -0
- package/rules/autoconsent/poki.json +37 -0
- package/rules/autoconsent/polisen-se.json +26 -0
- package/rules/autoconsent/romeo.json +47 -0
- package/rules/autoconsent/stockholm-stad.json +42 -0
- package/rules/autoconsent/stright.json +19 -1
- package/rules/autoconsent/stripchat.com.json +26 -5
- package/rules/autoconsent/tvp.json +27 -0
- package/rules/autoconsent/urvaerket.json +33 -0
- package/rules/autoconsent/volvocars-com.json +23 -2
- package/rules/autoconsent/vue-cookie-accept-decline.json +42 -0
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/tests/appconsent-legacy.spec.ts +1 -1
- package/tests/beetle-tracking.spec.ts +3 -0
- package/tests/casier-judiciaire-justice-gouv-fr.spec.ts +3 -0
- package/tests/civilservicejobs-service-gov-uk.spec.ts +3 -0
- package/tests/cookiesinfo-closecookies.spec.ts +8 -0
- package/tests/dack365.spec.ts +3 -0
- package/tests/eu-cookie-law-popup.spec.ts +8 -0
- package/tests/fascicolosanitario-lombardia.spec.ts +3 -0
- package/tests/fundingchoices.spec.ts +7 -1
- package/tests/hyrabostad.spec.ts +3 -0
- package/tests/insided.spec.ts +9 -0
- package/tests/kartverket.spec.ts +3 -0
- package/tests/luxmed.spec.ts +3 -0
- package/tests/meta-cookie-dialog.spec.ts +14 -0
- package/tests/mittanbud.spec.ts +3 -0
- package/tests/poki.spec.ts +6 -0
- package/tests/polisen-se.spec.ts +3 -0
- package/tests/romeo.spec.ts +3 -0
- package/tests/stockholm-stad.spec.ts +7 -0
- package/tests/stright.spec.ts +11 -0
- package/tests/stripchat.com.spec.ts +4 -1
- package/tests/tvp.spec.ts +3 -0
- package/tests/urvaerket.spec.ts +13 -0
- package/tests/volvocars-com.spec.ts +1 -1
- package/tests/vue-cookie-accept-decline.spec.ts +8 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +49 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import generateCMPTests from '../playwright/runner';
|
|
2
2
|
|
|
3
|
-
generateCMPTests('AppConsent legacy', ['https://www.meteociel.fr/'], {
|
|
3
|
+
generateCMPTests('AppConsent legacy', ['https://www.meteociel.fr/', 'https://www.maxifoot.fr/', 'https://www.voltex.fr/'], {
|
|
4
4
|
testOptIn: false,
|
|
5
5
|
testOptOut: true,
|
|
6
6
|
onlyRegions: ['US', 'FR'],
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
generateCMPTests('cookiesinfo-closecookies', ['https://spmzoz-slupsk.pl/', 'https://aktywator.witaj-swiecie.pl/', 'https://poldan.pl/']);
|
|
4
|
+
|
|
5
|
+
// only reachable from Polish IPs
|
|
6
|
+
generateCMPTests('cookiesinfo-closecookies', ['https://edu.gdansk.pl/'], {
|
|
7
|
+
onlyRegions: ['PL'],
|
|
8
|
+
});
|
|
@@ -2,7 +2,13 @@ import generateCMPTests from '../playwright/runner';
|
|
|
2
2
|
|
|
3
3
|
generateCMPTests(
|
|
4
4
|
'funding-choices',
|
|
5
|
-
[
|
|
5
|
+
[
|
|
6
|
+
'https://www.bbc.com/',
|
|
7
|
+
'https://www.accuweather.com/',
|
|
8
|
+
'https://hbr.org/',
|
|
9
|
+
'https://www.dinarguru.com/',
|
|
10
|
+
'http://biketrailspfannenstiel.ch/',
|
|
11
|
+
],
|
|
6
12
|
{
|
|
7
13
|
skipRegions: ['US', 'GB'],
|
|
8
14
|
},
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
generateCMPTests(
|
|
4
|
+
'meta-cookie-dialog',
|
|
5
|
+
['https://www.messenger.com/', 'https://developers.facebook.com/', 'https://business.facebook.com/'],
|
|
6
|
+
{
|
|
7
|
+
skipRegions: ['US'],
|
|
8
|
+
},
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
generateCMPTests('meta-cookie-dialog', ['https://www.messenger.com/'], {
|
|
12
|
+
mobile: true,
|
|
13
|
+
skipRegions: ['US'],
|
|
14
|
+
});
|
package/tests/stright.spec.ts
CHANGED
|
@@ -6,3 +6,14 @@ generateCMPTests('stright', [
|
|
|
6
6
|
'https://www.makita.co.jp/',
|
|
7
7
|
'https://www.yamada-denki.jp/',
|
|
8
8
|
]);
|
|
9
|
+
|
|
10
|
+
// settings dialog with category toggles and no reject-all button; mapfan.com is only reachable from Japan
|
|
11
|
+
generateCMPTests('stright', ['https://mapfan.com/'], {
|
|
12
|
+
onlyRegions: ['JP'],
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// no accept-all button in the first layer
|
|
16
|
+
generateCMPTests('stright', ['https://www.subaru.jp/'], {
|
|
17
|
+
onlyRegions: ['JP'],
|
|
18
|
+
testOptIn: false,
|
|
19
|
+
});
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import generateCMPTests from '../playwright/runner';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// Other regions put an 18+ gate in front of the banner, which the test runner cannot pass
|
|
4
|
+
generateCMPTests('stripchat.com', ['https://xhamsterlive.com/', 'https://stripchat.com/', 'https://superchat.live/'], {
|
|
5
|
+
onlyRegions: ['GB'],
|
|
6
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
generateCMPTests(
|
|
4
|
+
'urvaerket',
|
|
5
|
+
[
|
|
6
|
+
'https://www.urvaerket.dk/',
|
|
7
|
+
'https://www.uret.se/',
|
|
8
|
+
'https://www.urverket.no/',
|
|
9
|
+
'https://www.laatukellot.fi/',
|
|
10
|
+
'https://www.thewatchagency.com/',
|
|
11
|
+
],
|
|
12
|
+
{},
|
|
13
|
+
);
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
cleanButtonText,
|
|
5
5
|
classifyButtonTextRegex,
|
|
6
6
|
classifyButtons,
|
|
7
|
+
classifyPopup,
|
|
7
8
|
isExcludedPopup,
|
|
8
9
|
} from '../../lib/heuristic-classify';
|
|
9
10
|
import { getActionablePopups, isDisabled, excludeContainers, getButtonData, isDialogLikeElement } from '../../lib/heuristics';
|
|
@@ -387,6 +388,38 @@ describe('classifyButtonTextRegex', () => {
|
|
|
387
388
|
expect(classifyButtonTextRegex('Сохранить и закрыть')).to.equal('acknowledge');
|
|
388
389
|
});
|
|
389
390
|
|
|
391
|
+
it('matches Catalan acknowledge buttons', () => {
|
|
392
|
+
expect(classifyButtonTextRegex('Entenc')).to.equal('acknowledge');
|
|
393
|
+
expect(classifyButtonTextRegex('Ho entenc')).to.equal('acknowledge');
|
|
394
|
+
expect(classifyButtonTextRegex('Entès!')).to.equal('acknowledge');
|
|
395
|
+
expect(classifyButtonTextRegex('Entesos')).to.equal('acknowledge');
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
it('matches Catalan necessary-only buttons as reject', () => {
|
|
399
|
+
expect(classifyButtonTextRegex('Només les necessàries')).to.equal('reject');
|
|
400
|
+
expect(classifyButtonTextRegex('Només necessàries')).to.equal('reject');
|
|
401
|
+
expect(classifyButtonTextRegex('Necessàries')).to.equal('reject');
|
|
402
|
+
expect(classifyButtonTextRegex('Acceptar només les galetes necessàries')).to.equal('reject');
|
|
403
|
+
expect(classifyButtonTextRegex('Només galetes tècniques')).to.equal('reject');
|
|
404
|
+
expect(classifyButtonTextRegex('Només les essencials')).to.equal('reject');
|
|
405
|
+
expect(classifyButtonTextRegex('Continuar sense acceptar')).to.equal('reject');
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
it('matches Catalan settings buttons', () => {
|
|
409
|
+
expect(classifyButtonTextRegex('Configuració')).to.equal('settings');
|
|
410
|
+
expect(classifyButtonTextRegex('Personalitzar')).to.equal('settings');
|
|
411
|
+
expect(classifyButtonTextRegex('Preferències')).to.equal('settings');
|
|
412
|
+
expect(classifyButtonTextRegex('Més opcions')).to.equal('settings');
|
|
413
|
+
expect(classifyButtonTextRegex('Configuració de galetes')).to.equal('settings');
|
|
414
|
+
expect(classifyButtonTextRegex('Gestionar les meves preferències')).to.equal('settings');
|
|
415
|
+
expect(classifyButtonTextRegex('Gestiona les galetes')).to.equal('settings');
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
it('does not treat Catalan save or accept buttons as settings or reject', () => {
|
|
419
|
+
expect(classifyButtonTextRegex('Desar preferències')).to.not.equal('settings');
|
|
420
|
+
expect(classifyButtonTextRegex('Acceptar')).to.equal('accept');
|
|
421
|
+
});
|
|
422
|
+
|
|
390
423
|
it('does not treat Russian subscription buttons as reject', () => {
|
|
391
424
|
expect(classifyButtonTextRegex('Отказаться от подписки')).to.equal('other');
|
|
392
425
|
});
|
|
@@ -412,6 +445,22 @@ describe('classifyButtonTextRegex', () => {
|
|
|
412
445
|
});
|
|
413
446
|
});
|
|
414
447
|
|
|
448
|
+
describe('classifyPopup', () => {
|
|
449
|
+
function classify(texts: string[]) {
|
|
450
|
+
return classifyPopup(texts.map((text) => ({ text, regexClassification: classifyButtonTextRegex(text) })));
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
it('dismisses a Catalan notice-only banner as tier1', () => {
|
|
454
|
+
expect(classify(['Entenc'])).to.equal('tier1');
|
|
455
|
+
});
|
|
456
|
+
|
|
457
|
+
it('does not acknowledge a Catalan banner that offers necessary-only or settings', () => {
|
|
458
|
+
expect(classify(['Entès', 'Només les necessàries'])).to.equal('reject');
|
|
459
|
+
expect(classify(['Entès', 'Preferències'])).to.equal('none');
|
|
460
|
+
expect(classify(['Entès', 'Personalitzar'])).to.equal('none');
|
|
461
|
+
});
|
|
462
|
+
});
|
|
463
|
+
|
|
415
464
|
describe('classifyButtons', () => {
|
|
416
465
|
it('separates reject buttons from other buttons', () => {
|
|
417
466
|
const buttons: ButtonData[] = [
|