@duckduckgo/autoconsent 6.6.1 → 7.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 +27 -0
- package/dist/addon-firefox/background.bundle.js +116 -11
- package/dist/addon-firefox/content.bundle.js +5 -4
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rules.json +99 -0
- package/dist/addon-mv3/background.bundle.js +116 -11
- package/dist/addon-mv3/content.bundle.js +5 -4
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rules.json +99 -0
- package/dist/autoconsent.cjs.js +5 -4
- package/dist/autoconsent.esm.js +5 -4
- package/dist/autoconsent.playwright.js +1 -1
- package/lib/cmps/base.ts +1 -1
- package/lib/eval-handler.ts +3 -1
- package/lib/eval-snippets.ts +1 -1
- package/lib/messages.ts +2 -0
- package/package.json +1 -1
- package/rules/autoconsent/ciaopeople-it.json +24 -0
- package/rules/autoconsent/csu-landtag-de.json +27 -0
- package/rules/autoconsent/roofingmegastore-co-uk.json +20 -0
- package/rules/rules.json +99 -0
- package/tests/ciaopeople-it.spec.ts +8 -0
- package/tests/csu-landtag-de.spec.ts +5 -0
- package/tests/microsoft.spec.ts +2 -1
- package/tests/roofingmegastore-co-uk.spec.ts +5 -0
package/dist/autoconsent.cjs.js
CHANGED
|
@@ -623,12 +623,13 @@ var evalState = {
|
|
|
623
623
|
pending: /* @__PURE__ */ new Map(),
|
|
624
624
|
sendContentMessage: null
|
|
625
625
|
};
|
|
626
|
-
function requestEval(code) {
|
|
626
|
+
function requestEval(code, snippetId) {
|
|
627
627
|
const id = getRandomID();
|
|
628
628
|
evalState.sendContentMessage({
|
|
629
629
|
type: "eval",
|
|
630
630
|
id,
|
|
631
|
-
code
|
|
631
|
+
code,
|
|
632
|
+
snippetId
|
|
632
633
|
});
|
|
633
634
|
const deferred = new Deferred(id);
|
|
634
635
|
evalState.pending.set(deferred.id, deferred);
|
|
@@ -712,7 +713,7 @@ var snippets = {
|
|
|
712
713
|
EVAL_MEDIAVINE_0: () => document.querySelectorAll('[data-name="mediavine-gdpr-cmp"] input[type=checkbox]').forEach((x) => x.checked && x.click()) || true,
|
|
713
714
|
EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Reject|Ablehnen"))[0].click() || true,
|
|
714
715
|
EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
|
|
715
|
-
EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC"),
|
|
716
|
+
EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC|GHCC"),
|
|
716
717
|
EVAL_MOOVE_0: () => document.querySelectorAll("#moove_gdpr_cookie_modal input").forEach((i) => {
|
|
717
718
|
if (!i.disabled && i.name !== "moove_gdpr_strict_cookies")
|
|
718
719
|
i.checked = false;
|
|
@@ -800,7 +801,7 @@ var AutoConsentCMPBase = class {
|
|
|
800
801
|
}
|
|
801
802
|
const snippetSrc = getFunctionBody(snippet);
|
|
802
803
|
enableLogs && console.log("async eval:", snippetId, snippetSrc);
|
|
803
|
-
return requestEval(snippetSrc).catch((e) => {
|
|
804
|
+
return requestEval(snippetSrc, snippetId).catch((e) => {
|
|
804
805
|
enableLogs && console.error("error evaluating rule", snippetId, e);
|
|
805
806
|
return false;
|
|
806
807
|
});
|
package/dist/autoconsent.esm.js
CHANGED
|
@@ -598,12 +598,13 @@ var evalState = {
|
|
|
598
598
|
pending: /* @__PURE__ */ new Map(),
|
|
599
599
|
sendContentMessage: null
|
|
600
600
|
};
|
|
601
|
-
function requestEval(code) {
|
|
601
|
+
function requestEval(code, snippetId) {
|
|
602
602
|
const id = getRandomID();
|
|
603
603
|
evalState.sendContentMessage({
|
|
604
604
|
type: "eval",
|
|
605
605
|
id,
|
|
606
|
-
code
|
|
606
|
+
code,
|
|
607
|
+
snippetId
|
|
607
608
|
});
|
|
608
609
|
const deferred = new Deferred(id);
|
|
609
610
|
evalState.pending.set(deferred.id, deferred);
|
|
@@ -687,7 +688,7 @@ var snippets = {
|
|
|
687
688
|
EVAL_MEDIAVINE_0: () => document.querySelectorAll('[data-name="mediavine-gdpr-cmp"] input[type=checkbox]').forEach((x) => x.checked && x.click()) || true,
|
|
688
689
|
EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Reject|Ablehnen"))[0].click() || true,
|
|
689
690
|
EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
|
|
690
|
-
EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC"),
|
|
691
|
+
EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC|GHCC"),
|
|
691
692
|
EVAL_MOOVE_0: () => document.querySelectorAll("#moove_gdpr_cookie_modal input").forEach((i) => {
|
|
692
693
|
if (!i.disabled && i.name !== "moove_gdpr_strict_cookies")
|
|
693
694
|
i.checked = false;
|
|
@@ -775,7 +776,7 @@ var AutoConsentCMPBase = class {
|
|
|
775
776
|
}
|
|
776
777
|
const snippetSrc = getFunctionBody(snippet);
|
|
777
778
|
enableLogs && console.log("async eval:", snippetId, snippetSrc);
|
|
778
|
-
return requestEval(snippetSrc).catch((e) => {
|
|
779
|
+
return requestEval(snippetSrc, snippetId).catch((e) => {
|
|
779
780
|
enableLogs && console.error("error evaluating rule", snippetId, e);
|
|
780
781
|
return false;
|
|
781
782
|
});
|