@duckduckgo/autoconsent 14.97.0 → 15.0.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 +18 -0
- package/dist/addon-firefox/background.bundle.js +10 -1
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +142 -33
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/popup.bundle.js +10 -1
- package/dist/addon-firefox/rules.json +1 -1
- package/dist/addon-mv3/background.bundle.js +10 -1
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +142 -33
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/popup.bundle.js +10 -1
- package/dist/addon-mv3/rules.json +1 -1
- package/dist/autoconsent.cjs.js +142 -33
- package/dist/autoconsent.esm.js +142 -33
- package/dist/autoconsent.extra.cjs.js +142 -33
- package/dist/autoconsent.extra.esm.js +142 -33
- package/dist/autoconsent.playwright.js +142 -33
- package/dist/types/cmps/base.d.ts +4 -2
- package/dist/types/heuristic-patterns.d.ts +3 -0
- package/dist/types/heuristics.d.ts +4 -7
- package/dist/types/types.d.ts +18 -2
- package/lib/cmps/base.ts +20 -7
- package/lib/heuristic-patterns.ts +68 -1
- package/lib/heuristics.ts +76 -27
- package/lib/types.ts +20 -2
- package/lib/utils.ts +2 -1
- package/lib/web.ts +3 -1
- package/package.json +1 -1
- package/rules/autoconsent/twitch.json +1 -1
- package/rules/compact-rules.json +1 -1
- package/rules/rules.json +1 -1
- package/tests-wtr/heuristics/get-actionable-popups.html +16 -0
- package/tests-wtr/heuristics/get-actionable-popups.ts +85 -6
- package/tests-wtr/heuristics/heuristic-cmp.html +69 -0
- package/tests-wtr/heuristics/heuristic-cmp.ts +178 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +96 -28
- package/tests-wtr/lifecycle/find-cmp.html +14 -0
- package/tests-wtr/lifecycle/find-cmp.ts +44 -2
|
@@ -934,6 +934,14 @@
|
|
|
934
934
|
return parseImpl(url, 5, suffixLookup, options, getEmptyResult());
|
|
935
935
|
}
|
|
936
936
|
|
|
937
|
+
// lib/types.ts
|
|
938
|
+
var PopupHandlingModes = {
|
|
939
|
+
None: -1,
|
|
940
|
+
Reject: 0,
|
|
941
|
+
Tier1: 1,
|
|
942
|
+
Tier2: 2
|
|
943
|
+
};
|
|
944
|
+
|
|
937
945
|
// lib/utils.ts
|
|
938
946
|
function copyObject(data) {
|
|
939
947
|
if (globalThis.structuredClone) {
|
|
@@ -968,7 +976,8 @@
|
|
|
968
976
|
waits: false
|
|
969
977
|
},
|
|
970
978
|
performanceLoggingEnabled: false,
|
|
971
|
-
heuristicPopupSearchTimeout: 100
|
|
979
|
+
heuristicPopupSearchTimeout: 100,
|
|
980
|
+
heuristicMode: PopupHandlingModes.Reject
|
|
972
981
|
};
|
|
973
982
|
const updatedConfig = copyObject(defaultConfig);
|
|
974
983
|
for (const key of Object.keys(defaultConfig)) {
|