@duckduckgo/autoconsent 18.11.0 → 18.12.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.
Files changed (88) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/addon-firefox/background.bundle.js +10 -0
  3. package/dist/addon-firefox/compact-rules.json +1 -1
  4. package/dist/addon-firefox/content.bundle.js +10 -0
  5. package/dist/addon-firefox/manifest.json +1 -1
  6. package/dist/addon-firefox/rule-index.json +1 -1
  7. package/dist/addon-firefox/rules.json +1 -1
  8. package/dist/addon-mv3/background.bundle.js +10 -0
  9. package/dist/addon-mv3/compact-rules.json +1 -1
  10. package/dist/addon-mv3/content.bundle.js +10 -0
  11. package/dist/addon-mv3/manifest.json +1 -1
  12. package/dist/addon-mv3/rule-index.json +1 -1
  13. package/dist/addon-mv3/rules.json +1 -1
  14. package/dist/autoconsent.cjs.js +10 -0
  15. package/dist/autoconsent.esm.js +10 -0
  16. package/dist/autoconsent.playwright.js +10 -0
  17. package/dist/autoconsent.standalone.js +11 -1
  18. package/dist/types/eval-snippets.d.ts +2 -0
  19. package/lib/eval-snippets.ts +10 -0
  20. package/package.json +1 -1
  21. package/rules/autoconsent/ccm-dialog.json +48 -0
  22. package/rules/autoconsent/chesskid.json +43 -0
  23. package/rules/autoconsent/clinch.json +1 -1
  24. package/rules/autoconsent/clio-online-matomo.json +10 -0
  25. package/rules/autoconsent/cookieconsent2.json +3 -2
  26. package/rules/autoconsent/foster-cookie-notice.json +34 -0
  27. package/rules/autoconsent/fulmo.json +10 -0
  28. package/rules/autoconsent/gsb-cookiebanner-close.json +27 -0
  29. package/rules/autoconsent/hetgoed.json +20 -0
  30. package/rules/autoconsent/hutshopping.json +9 -0
  31. package/rules/autoconsent/icn-cookie-notice.json +34 -0
  32. package/rules/autoconsent/internetvergelijk.json +47 -0
  33. package/rules/autoconsent/isn-cookie-consent.json +10 -0
  34. package/rules/autoconsent/knowunity.json +10 -0
  35. package/rules/autoconsent/lightspeed-cookielaw.json +30 -0
  36. package/rules/autoconsent/lobbes.json +18 -0
  37. package/rules/autoconsent/mercadolibre-frame.json +42 -0
  38. package/rules/autoconsent/mercadolibre-subdomain.json +33 -0
  39. package/rules/autoconsent/mindshape-cookie-consent.json +60 -0
  40. package/rules/autoconsent/moneywise.json +56 -0
  41. package/rules/autoconsent/netwerknotarissen.json +23 -0
  42. package/rules/autoconsent/perplex-cookie-consent.json +12 -0
  43. package/rules/autoconsent/radish-cookie-consent.json +36 -0
  44. package/rules/autoconsent/reliving.json +39 -0
  45. package/rules/autoconsent/scriptex.json +11 -0
  46. package/rules/autoconsent/shopware5.json +30 -4
  47. package/rules/autoconsent/spreekwoorden.json +31 -0
  48. package/rules/autoconsent/stoffe-hemmers.json +21 -0
  49. package/rules/autoconsent/stripinfo.be.json +18 -0
  50. package/rules/autoconsent/thisiseindhoven.json +17 -0
  51. package/rules/autoconsent/tinycookie.json +36 -0
  52. package/rules/autoconsent/vendic-cookiebar.json +27 -4
  53. package/rules/autoconsent/wpj-cookiebar.json +45 -0
  54. package/rules/autoconsent/yunders.json +16 -0
  55. package/rules/compact-rules.json +1 -1
  56. package/rules/rule-index.json +1 -1
  57. package/rules/rules.json +1 -1
  58. package/tests/sites/ccm-dialog.json +9 -0
  59. package/tests/sites/chesskid.json +10 -0
  60. package/tests/sites/clio-online-matomo.json +9 -0
  61. package/tests/sites/foster-cookie-notice.json +18 -0
  62. package/tests/sites/fulmo.json +14 -0
  63. package/tests/sites/gsb-cookiebanner-close.json +22 -0
  64. package/tests/sites/hetgoed.json +9 -0
  65. package/tests/sites/hutshopping.json +15 -0
  66. package/tests/sites/icn-cookie-notice.json +21 -0
  67. package/tests/sites/internetvergelijk.json +13 -0
  68. package/tests/sites/isn-cookie-consent.json +8 -0
  69. package/tests/sites/knowunity.json +22 -0
  70. package/tests/sites/lightspeed-cookielaw.json +19 -0
  71. package/tests/sites/lobbes.json +10 -0
  72. package/tests/sites/mercadolibre-subdomain.json +15 -0
  73. package/tests/sites/mindshape-cookie-consent.json +23 -0
  74. package/tests/sites/moneywise.json +14 -0
  75. package/tests/sites/netwerknotarissen.json +8 -0
  76. package/tests/sites/perplex-cookie-consent.json +22 -0
  77. package/tests/sites/radish-cookie-consent.json +16 -0
  78. package/tests/sites/reliving.json +8 -0
  79. package/tests/sites/scriptex.json +8 -0
  80. package/tests/sites/shopware5.json +14 -0
  81. package/tests/sites/spreekwoorden.json +9 -0
  82. package/tests/sites/stoffe-hemmers.json +8 -0
  83. package/tests/sites/stripinfo.be.json +9 -0
  84. package/tests/sites/thisiseindhoven.json +8 -0
  85. package/tests/sites/tinycookie.json +13 -0
  86. package/tests/sites/vendic-cookiebar.json +5 -0
  87. package/tests/sites/wpj-cookiebar.json +13 -0
  88. package/tests/sites/yunders.json +8 -0
@@ -416,6 +416,16 @@ var snippets = {
416
416
  EVAL_KROWN_COOKIE_BANNER_TEST: () => localStorage.getItem("krown-cookie-banner") === "true",
417
417
  // the decline handler listens for mouseup/touchend, which element.click() does not dispatch
418
418
  EVAL_LETHPOLYTECH_DECLINE: () => document.querySelector(".consent-banner .cookie-decline").dispatchEvent(new MouseEvent("mouseup", { bubbles: true, cancelable: true, view: window })) || true,
419
+ // reading a cross-origin parent's document throws
420
+ EVAL_MERCADOLIBRE_CROSS_ORIGIN_PARENT: () => {
421
+ try {
422
+ return !window.parent.document;
423
+ } catch (e) {
424
+ return true;
425
+ }
426
+ },
427
+ // the embedded preferences page saves its current toggles on this message, normally sent by the parent's Save button
428
+ EVAL_MERCADOLIBRE_SAVE: () => window.postMessage({ eventName: "saveCookiesPreference" }, "*") || true,
419
429
  EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Reject|Ablehnen"))[0].click() || true,
420
430
  EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
421
431
  EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC|GHCC"),
@@ -386,6 +386,16 @@ var snippets = {
386
386
  EVAL_KROWN_COOKIE_BANNER_TEST: () => localStorage.getItem("krown-cookie-banner") === "true",
387
387
  // the decline handler listens for mouseup/touchend, which element.click() does not dispatch
388
388
  EVAL_LETHPOLYTECH_DECLINE: () => document.querySelector(".consent-banner .cookie-decline").dispatchEvent(new MouseEvent("mouseup", { bubbles: true, cancelable: true, view: window })) || true,
389
+ // reading a cross-origin parent's document throws
390
+ EVAL_MERCADOLIBRE_CROSS_ORIGIN_PARENT: () => {
391
+ try {
392
+ return !window.parent.document;
393
+ } catch (e) {
394
+ return true;
395
+ }
396
+ },
397
+ // the embedded preferences page saves its current toggles on this message, normally sent by the parent's Save button
398
+ EVAL_MERCADOLIBRE_SAVE: () => window.postMessage({ eventName: "saveCookiesPreference" }, "*") || true,
389
399
  EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Reject|Ablehnen"))[0].click() || true,
390
400
  EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
391
401
  EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC|GHCC"),
@@ -388,6 +388,16 @@
388
388
  EVAL_KROWN_COOKIE_BANNER_TEST: () => localStorage.getItem("krown-cookie-banner") === "true",
389
389
  // the decline handler listens for mouseup/touchend, which element.click() does not dispatch
390
390
  EVAL_LETHPOLYTECH_DECLINE: () => document.querySelector(".consent-banner .cookie-decline").dispatchEvent(new MouseEvent("mouseup", { bubbles: true, cancelable: true, view: window })) || true,
391
+ // reading a cross-origin parent's document throws
392
+ EVAL_MERCADOLIBRE_CROSS_ORIGIN_PARENT: () => {
393
+ try {
394
+ return !window.parent.document;
395
+ } catch (e) {
396
+ return true;
397
+ }
398
+ },
399
+ // the embedded preferences page saves its current toggles on this message, normally sent by the parent's Save button
400
+ EVAL_MERCADOLIBRE_SAVE: () => window.postMessage({ eventName: "saveCookiesPreference" }, "*") || true,
391
401
  EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Reject|Ablehnen"))[0].click() || true,
392
402
  EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
393
403
  EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC|GHCC"),