@duckduckgo/autoconsent 16.45.0 → 16.47.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/.github/dependabot.yml +6 -0
- package/.github/labeler.yml +1 -1
- package/.github/workflows/release-labels.yml +19 -11
- package/CHANGELOG.md +51 -0
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +5 -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 +5 -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 +5 -3
- package/dist/autoconsent.esm.js +5 -3
- package/dist/autoconsent.playwright.js +5 -3
- package/dist/autoconsent.standalone.js +6 -4
- package/lib/encoding.ts +1 -8
- package/lib/heuristic-patterns.ts +1 -1
- package/lib/messages.ts +1 -6
- package/lib/web.ts +5 -4
- package/package.json +6 -6
- package/playwright/runner.ts +13 -0
- package/rules/autoconsent/controlgame.json +12 -0
- package/rules/autoconsent/cookieyes.json +3 -1
- package/rules/autoconsent/cookiez.json +9 -0
- package/rules/autoconsent/cuvva.com.json +55 -0
- package/rules/autoconsent/dalecarnegie.json +44 -0
- package/rules/autoconsent/fanatics.json +9 -0
- package/rules/autoconsent/jpmorgan-chase.json +10 -0
- package/rules/autoconsent/lego.json +26 -0
- package/rules/autoconsent/privacy-area.json +56 -0
- package/rules/autoconsent/securiti-gpc-flyout.json +22 -0
- package/rules/autoconsent/speciesplus.json +10 -0
- package/rules/autoconsent/squarespace-cookie-banner.json +24 -1
- package/rules/autoconsent/ziptozipmoving.json +44 -0
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/tests/controlgame.spec.ts +3 -0
- package/tests/cookieyes.spec.ts +2 -0
- package/tests/cookiez.spec.ts +12 -0
- package/tests/cuvva.com.spec.ts +4 -0
- package/tests/dalecarnegie.spec.ts +3 -0
- package/tests/fanatics.spec.ts +9 -0
- package/tests/jpmorgan-chase.spec.ts +8 -0
- package/tests/lego.spec.ts +8 -0
- package/tests/privacy-area.spec.ts +9 -0
- package/tests/securiti-gpc-flyout.spec.ts +21 -0
- package/tests/speciesplus.spec.ts +3 -0
- package/tests/squarespace-cookie-banner.spec.ts +8 -1
- package/tests/ziptozipmoving.spec.ts +5 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +6 -0
- package/tests-wtr/lifecycle/find-cmp.ts +13 -0
- package/tsconfig.build.json +1 -0
- package/tsconfig.json +2 -1
package/dist/autoconsent.cjs.js
CHANGED
|
@@ -472,7 +472,7 @@ var DETECT_PATTERNS = [
|
|
|
472
472
|
// "only necessary" is probably too broad
|
|
473
473
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
474
474
|
/(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi,
|
|
475
|
-
/we (?:use|serve)(?: optional)? cookies/gi,
|
|
475
|
+
/we (?:use|serve)(?: optional| essential)? cookies/gi,
|
|
476
476
|
/we are using cookies/gi,
|
|
477
477
|
/use of cookies/gi,
|
|
478
478
|
/website uses cookies to enhance your browsing experience/gi,
|
|
@@ -3331,7 +3331,8 @@ var AutoConsent = class {
|
|
|
3331
3331
|
}
|
|
3332
3332
|
}
|
|
3333
3333
|
});
|
|
3334
|
-
const
|
|
3334
|
+
const heuristicEnabled = isTop && this.config.heuristicMode !== "off";
|
|
3335
|
+
const heuristicRules = heuristicEnabled && this.state.findCmpAttempts % 2 === 0 ? [new AutoConsentHeuristicCMP(this, this.config.heuristicMode)] : [];
|
|
3335
3336
|
const rulesPriorityStages = [
|
|
3336
3337
|
["site-specific", siteSpecificRules],
|
|
3337
3338
|
["generic", genericRules],
|
|
@@ -3372,7 +3373,8 @@ var AutoConsent = class {
|
|
|
3372
3373
|
this.detectHeuristics();
|
|
3373
3374
|
if (foundCMPs.length === 0 && retries > 0) {
|
|
3374
3375
|
const waitFor2 = [this.domActions.wait(500)];
|
|
3375
|
-
|
|
3376
|
+
const heuristicSkipped = heuristicEnabled && heuristicRules.length === 0;
|
|
3377
|
+
if (this.state.findCmpAttempts > 1 && !heuristicSkipped) {
|
|
3376
3378
|
waitFor2.push(mutationObserver);
|
|
3377
3379
|
}
|
|
3378
3380
|
try {
|
package/dist/autoconsent.esm.js
CHANGED
|
@@ -442,7 +442,7 @@ var DETECT_PATTERNS = [
|
|
|
442
442
|
// "only necessary" is probably too broad
|
|
443
443
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
444
444
|
/(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi,
|
|
445
|
-
/we (?:use|serve)(?: optional)? cookies/gi,
|
|
445
|
+
/we (?:use|serve)(?: optional| essential)? cookies/gi,
|
|
446
446
|
/we are using cookies/gi,
|
|
447
447
|
/use of cookies/gi,
|
|
448
448
|
/website uses cookies to enhance your browsing experience/gi,
|
|
@@ -3301,7 +3301,8 @@ var AutoConsent = class {
|
|
|
3301
3301
|
}
|
|
3302
3302
|
}
|
|
3303
3303
|
});
|
|
3304
|
-
const
|
|
3304
|
+
const heuristicEnabled = isTop && this.config.heuristicMode !== "off";
|
|
3305
|
+
const heuristicRules = heuristicEnabled && this.state.findCmpAttempts % 2 === 0 ? [new AutoConsentHeuristicCMP(this, this.config.heuristicMode)] : [];
|
|
3305
3306
|
const rulesPriorityStages = [
|
|
3306
3307
|
["site-specific", siteSpecificRules],
|
|
3307
3308
|
["generic", genericRules],
|
|
@@ -3342,7 +3343,8 @@ var AutoConsent = class {
|
|
|
3342
3343
|
this.detectHeuristics();
|
|
3343
3344
|
if (foundCMPs.length === 0 && retries > 0) {
|
|
3344
3345
|
const waitFor2 = [this.domActions.wait(500)];
|
|
3345
|
-
|
|
3346
|
+
const heuristicSkipped = heuristicEnabled && heuristicRules.length === 0;
|
|
3347
|
+
if (this.state.findCmpAttempts > 1 && !heuristicSkipped) {
|
|
3346
3348
|
waitFor2.push(mutationObserver);
|
|
3347
3349
|
}
|
|
3348
3350
|
try {
|
|
@@ -444,7 +444,7 @@
|
|
|
444
444
|
// "only necessary" is probably too broad
|
|
445
445
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
446
446
|
/(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi,
|
|
447
|
-
/we (?:use|serve)(?: optional)? cookies/gi,
|
|
447
|
+
/we (?:use|serve)(?: optional| essential)? cookies/gi,
|
|
448
448
|
/we are using cookies/gi,
|
|
449
449
|
/use of cookies/gi,
|
|
450
450
|
/website uses cookies to enhance your browsing experience/gi,
|
|
@@ -3071,7 +3071,8 @@
|
|
|
3071
3071
|
}
|
|
3072
3072
|
}
|
|
3073
3073
|
});
|
|
3074
|
-
const
|
|
3074
|
+
const heuristicEnabled = isTop && this.config.heuristicMode !== "off";
|
|
3075
|
+
const heuristicRules = heuristicEnabled && this.state.findCmpAttempts % 2 === 0 ? [new AutoConsentHeuristicCMP(this, this.config.heuristicMode)] : [];
|
|
3075
3076
|
const rulesPriorityStages = [
|
|
3076
3077
|
["site-specific", siteSpecificRules],
|
|
3077
3078
|
["generic", genericRules],
|
|
@@ -3112,7 +3113,8 @@
|
|
|
3112
3113
|
this.detectHeuristics();
|
|
3113
3114
|
if (foundCMPs.length === 0 && retries > 0) {
|
|
3114
3115
|
const waitFor2 = [this.domActions.wait(500)];
|
|
3115
|
-
|
|
3116
|
+
const heuristicSkipped = heuristicEnabled && heuristicRules.length === 0;
|
|
3117
|
+
if (this.state.findCmpAttempts > 1 && !heuristicSkipped) {
|
|
3116
3118
|
waitFor2.push(mutationObserver);
|
|
3117
3119
|
}
|
|
3118
3120
|
try {
|