@duckduckgo/autoconsent 5.3.0 → 6.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/.eslintrc +1 -1
- package/CHANGELOG.md +17 -0
- package/data/coverage.json +958 -1010
- package/dist/addon-firefox/background.bundle.js +13 -12
- package/dist/addon-firefox/content.bundle.js +1074 -930
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rules.json +83 -83
- package/dist/addon-mv3/background.bundle.js +13 -12
- package/dist/addon-mv3/content.bundle.js +1074 -930
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/popup.bundle.js +38 -0
- package/dist/addon-mv3/popup.html +2 -1
- package/dist/addon-mv3/rules.json +83 -83
- package/dist/autoconsent.cjs.js +1074 -937
- package/dist/autoconsent.esm.js +1074 -932
- package/dist/autoconsent.playwright.js +1 -1
- package/lib/cmps/airbnb.ts +1 -3
- package/lib/cmps/all.ts +13 -22
- package/lib/cmps/base.ts +123 -92
- package/lib/cmps/consentmanager.ts +7 -10
- package/lib/cmps/conversant.ts +1 -4
- package/lib/cmps/cookiebot.ts +6 -10
- package/lib/cmps/evidon.ts +1 -3
- package/lib/cmps/klaro.ts +3 -7
- package/lib/cmps/onetrust.ts +3 -7
- package/lib/cmps/sourcepoint-frame.ts +1 -4
- package/lib/cmps/tiktok.ts +1 -3
- package/lib/cmps/trustarc-frame.ts +1 -3
- package/lib/cmps/trustarc-top.ts +6 -5
- package/lib/cmps/uniconsent.ts +1 -3
- package/lib/eval-snippets.ts +105 -0
- package/lib/rule-executors.ts +0 -8
- package/lib/rules.ts +3 -1
- package/lib/types.ts +1 -1
- package/lib/web.ts +26 -13
- package/package.json +1 -1
- package/readme.md +3 -3
- package/rules/autoconsent/192.json +1 -1
- package/rules/autoconsent/adroll.json +1 -1
- package/rules/autoconsent/affinity-serif-com.json +1 -1
- package/rules/autoconsent/axeptio.json +1 -1
- package/rules/autoconsent/bing.json +1 -1
- package/rules/autoconsent/borlabs.json +1 -1
- package/rules/autoconsent/bundesregierung-de.json +1 -1
- package/rules/autoconsent/canva.json +1 -1
- package/rules/autoconsent/clickio.json +1 -1
- package/rules/autoconsent/clinch.json +1 -1
- package/rules/autoconsent/coinbase.json +1 -1
- package/rules/autoconsent/complianz-banner.json +1 -1
- package/rules/autoconsent/complianz-categories.json +1 -1
- package/rules/autoconsent/complianz-optin.json +1 -1
- package/rules/autoconsent/cookie-law-info.json +2 -2
- package/rules/autoconsent/cookie-manager-popup.json +1 -1
- package/rules/autoconsent/cookiealert.json +3 -3
- package/rules/autoconsent/cookiefirst.json +7 -8
- package/rules/autoconsent/cookieinformation.json +3 -3
- package/rules/autoconsent/dailymotion.json +1 -1
- package/rules/autoconsent/dsgvo.json +1 -1
- package/rules/autoconsent/dunelm.json +1 -1
- package/rules/autoconsent/etsy.json +2 -2
- package/rules/autoconsent/eu-cookie-compliance.json +1 -1
- package/rules/autoconsent/eu-cookie-law.json +1 -1
- package/rules/autoconsent/ezoic.json +2 -2
- package/rules/autoconsent/google.json +1 -1
- package/rules/autoconsent/iubenda.json +2 -2
- package/rules/autoconsent/jquery-cookiebar.json +1 -1
- package/rules/autoconsent/mediavine.json +1 -1
- package/rules/autoconsent/microsoft.json +3 -3
- package/rules/autoconsent/moove.json +1 -1
- package/rules/autoconsent/paypal.json +1 -1
- package/rules/autoconsent/primebox.json +1 -1
- package/rules/autoconsent/pubtech.json +1 -1
- package/rules/autoconsent/reddit.json +1 -1
- package/rules/autoconsent/sibbo.json +1 -1
- package/rules/autoconsent/sirdata.json +1 -1
- package/rules/autoconsent/snigel.json +1 -1
- package/rules/autoconsent/steampowered.json +1 -1
- package/rules/autoconsent/tarteaucitron.json +3 -3
- package/rules/autoconsent/tealium.json +4 -4
- package/rules/autoconsent/testcmp-cosmetic.json +1 -1
- package/rules/autoconsent/testcmp.json +1 -1
- package/rules/autoconsent/thefreedictionary.json +2 -2
- package/rules/autoconsent/theverge.json +1 -1
- package/rules/autoconsent/twitter.json +1 -1
- package/rules/autoconsent/ubuntu.com.json +1 -1
- package/rules/autoconsent/uk-cookie-consent.json +1 -1
- package/rules/autoconsent/usercentrics-api.json +7 -7
- package/rules/autoconsent/usercentrics-button.json +1 -1
- package/rules/autoconsent/waitrose.json +2 -2
- package/rules/autoconsent/wp-cookie-notice.json +1 -1
- package/rules/autoconsent/xing.json +1 -1
- package/rules/autoconsent/youtube-desktop.json +1 -1
- package/rules/autoconsent/youtube-mobile.json +1 -1
- package/rules/rules.json +83 -83
- package/lib/index.ts +0 -4
|
@@ -69,6 +69,38 @@
|
|
|
69
69
|
path: icon
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
+
async function initConfig() {
|
|
73
|
+
const storedConfig = await storageGet("config");
|
|
74
|
+
enableLogs && console.log("storedConfig", storedConfig);
|
|
75
|
+
const defaultConfig = {
|
|
76
|
+
enabled: true,
|
|
77
|
+
autoAction: "optOut",
|
|
78
|
+
// if falsy, the extension will wait for an explicit user signal before opting in/out
|
|
79
|
+
disabledCmps: [],
|
|
80
|
+
enablePrehide: true,
|
|
81
|
+
enableCosmeticRules: true,
|
|
82
|
+
detectRetries: 20,
|
|
83
|
+
isMainWorld: false,
|
|
84
|
+
prehideTimeout: 2e3
|
|
85
|
+
};
|
|
86
|
+
if (!storedConfig) {
|
|
87
|
+
enableLogs && console.log("new config", defaultConfig);
|
|
88
|
+
await storageSet({
|
|
89
|
+
config: defaultConfig
|
|
90
|
+
});
|
|
91
|
+
} else {
|
|
92
|
+
const updatedConfig = structuredClone(defaultConfig);
|
|
93
|
+
for (const key of Object.keys(defaultConfig)) {
|
|
94
|
+
if (typeof storedConfig[key] !== "undefined") {
|
|
95
|
+
updatedConfig[key] = storedConfig[key];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
enableLogs && console.log("updated config", updatedConfig);
|
|
99
|
+
await storageSet({
|
|
100
|
+
config: updatedConfig
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
72
104
|
|
|
73
105
|
// addon/popup.ts
|
|
74
106
|
async function init() {
|
|
@@ -83,6 +115,7 @@
|
|
|
83
115
|
const cosmeticOffRadio = document.querySelector("input#cosmetic-off");
|
|
84
116
|
const retriesInput = document.querySelector("input#retries");
|
|
85
117
|
const ruleReloadButton = document.querySelector("#reload");
|
|
118
|
+
const resetButton = document.querySelector("#reset");
|
|
86
119
|
const [currentTab] = await chrome.tabs.query({ active: true, lastFocusedWindow: true });
|
|
87
120
|
const tabId = currentTab.id;
|
|
88
121
|
const detectedKey = `detected${tabId}`;
|
|
@@ -164,6 +197,11 @@
|
|
|
164
197
|
rules: await res.json()
|
|
165
198
|
});
|
|
166
199
|
});
|
|
200
|
+
resetButton.addEventListener("click", async () => {
|
|
201
|
+
await storageRemove("config");
|
|
202
|
+
await initConfig();
|
|
203
|
+
window.close();
|
|
204
|
+
});
|
|
167
205
|
}
|
|
168
206
|
init();
|
|
169
207
|
})();
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
cursor: pointer;
|
|
14
14
|
border-radius: 3px;
|
|
15
15
|
}
|
|
16
|
-
#reload {
|
|
16
|
+
#reload,#reset {
|
|
17
17
|
width: 100%;
|
|
18
18
|
height: 2em;
|
|
19
19
|
margin: 0.5em auto;
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
<label for="retries">Detection attempts</label>
|
|
84
84
|
</div>
|
|
85
85
|
<button id="reload">Reload rules</button>
|
|
86
|
+
<button id="reset">Reset settings</button>
|
|
86
87
|
</fieldset>
|
|
87
88
|
<script src="popup.bundle.js"></script>
|
|
88
89
|
</body>
|