@duckduckgo/autoconsent 16.46.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 +28 -0
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +4 -2
- 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 +4 -2
- 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 +4 -2
- package/dist/autoconsent.esm.js +4 -2
- package/dist/autoconsent.playwright.js +4 -2
- package/dist/autoconsent.standalone.js +5 -3
- package/lib/encoding.ts +1 -8
- package/lib/messages.ts +1 -6
- package/lib/web.ts +5 -4
- package/package.json +6 -6
- package/rules/autoconsent/controlgame.json +12 -0
- package/rules/autoconsent/dalecarnegie.json +44 -0
- package/rules/autoconsent/jpmorgan-chase.json +10 -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/dalecarnegie.spec.ts +3 -0
- package/tests/jpmorgan-chase.spec.ts +8 -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
|
@@ -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
|
@@ -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 {
|
|
@@ -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 {
|