@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.
@@ -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
  });
@@ -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
  });