@duckduckgo/autoconsent 14.69.0 → 14.71.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 (49) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/Jenkinsfile +8 -22
  3. package/dist/addon-firefox/background.bundle.js +15 -2
  4. package/dist/addon-firefox/compact-rules.json +1 -1
  5. package/dist/addon-firefox/content.bundle.js +13 -0
  6. package/dist/addon-firefox/manifest.json +1 -1
  7. package/dist/addon-firefox/popup.bundle.js +1 -1
  8. package/dist/addon-firefox/rules.json +1 -1
  9. package/dist/addon-mv3/background.bundle.js +15 -2
  10. package/dist/addon-mv3/compact-rules.json +1 -1
  11. package/dist/addon-mv3/content.bundle.js +13 -0
  12. package/dist/addon-mv3/manifest.json +1 -1
  13. package/dist/addon-mv3/popup.bundle.js +1 -1
  14. package/dist/addon-mv3/rules.json +1 -1
  15. package/dist/autoconsent.cjs.js +13 -0
  16. package/dist/autoconsent.esm.js +13 -0
  17. package/dist/autoconsent.extra.cjs.js +14 -1
  18. package/dist/autoconsent.extra.esm.js +14 -1
  19. package/dist/autoconsent.playwright.js +14 -1
  20. package/dist/types/eval-snippets.d.ts +2 -0
  21. package/docs/puppeteer.md +82 -0
  22. package/lib/eval-snippets.ts +13 -0
  23. package/package.json +1 -1
  24. package/readme.md +4 -0
  25. package/rules/autoconsent/consentmo.json +44 -0
  26. package/rules/autoconsent/didomi.json +22 -0
  27. package/rules/autoconsent/gallup.json +9 -0
  28. package/rules/autoconsent/real-cookie-banner.json +1 -1
  29. package/rules/autoconsent/squarespace-cookie-banner.json +31 -0
  30. package/rules/build.ts +1 -1
  31. package/rules/compact-rules.json +1 -1
  32. package/rules/consentomatic.json +1 -1
  33. package/rules/generated/auto_AU_goodmoodprints.com_9fy.json +11 -11
  34. package/rules/generated/auto_GB_supremecourt.uk_0.json +9 -9
  35. package/rules/generated/auto_US_musicnotes.com_0.json +20 -5
  36. package/rules/rules.json +1 -1
  37. package/scripts/get-tests-to-run.js +79 -0
  38. package/tests/consentmo.spec.ts +15 -0
  39. package/tests/didomi.spec.ts +5 -4
  40. package/tests/gallup.spec.ts +6 -0
  41. package/tests/squarespace-cookie-banner.spec.ts +9 -0
  42. package/rules/generated/auto_AU_urallawoolroom.com.au_3ng.json +0 -28
  43. package/rules/generated/auto_CH_degussa-goldhandel.ch_mqc.json +0 -40
  44. package/rules/generated/auto_GB_filofax.com_uxo.json +0 -40
  45. package/rules/generated/auto_GB_musicnotes.com_0.json +0 -28
  46. package/tests/generated/auto_AU_urallawoolroom.com.au_3ng.spec.ts +0 -6
  47. package/tests/generated/auto_CH_degussa-goldhandel.ch_mqc.spec.ts +0 -6
  48. package/tests/generated/auto_GB_filofax.com_uxo.spec.ts +0 -2
  49. package/tests/generated/auto_GB_musicnotes.com_0.spec.ts +0 -6
@@ -459,6 +459,19 @@
459
459
  var snippets = {
460
460
  // code-based rules
461
461
  EVAL_0: () => console.log(1),
462
+ EVAL_DIDOMI_OPT_OUT: () => {
463
+ if (window.Didomi) {
464
+ window.Didomi.setUserDisagreeToAll();
465
+ return true;
466
+ }
467
+ return false;
468
+ },
469
+ EVAL_DIDOMI_TEST: () => {
470
+ if (window.Didomi) {
471
+ return window.Didomi.getUserConsentStatusForAll().purposes.disabled.length > 0;
472
+ }
473
+ return false;
474
+ },
462
475
  EVAL_CONSENTMANAGER_1: () => window.__cmp && typeof __cmp("getCMPData") === "object",
463
476
  EVAL_CONSENTMANAGER_2: () => !__cmp("consentStatus").userChoiceExists,
464
477
  EVAL_CONSENTMANAGER_3: () => __cmp("setConsent", 0),
@@ -3767,7 +3780,7 @@
3767
3780
  _config = new WeakMap();
3768
3781
 
3769
3782
  // rules/consentomatic.json
3770
- var consentomatic = { "didomi.io": { detectors: [{ presentMatcher: { target: { selector: "#didomi-host, #didomi-notice" }, type: "css" }, showingMatcher: { target: { selector: "body.didomi-popup-open, .didomi-notice-banner" }, type: "css" } }], methods: [{ action: { target: { selector: ".didomi-popup-notice-buttons .didomi-button:not(.didomi-button-highlight), .didomi-notice-banner .didomi-learn-more-button" }, type: "click" }, name: "OPEN_OPTIONS" }, { action: { actions: [{ retries: 50, target: { selector: "#didomi-purpose-cookies" }, type: "waitcss", waitTime: 50 }, { consents: [{ description: "Share (everything) with others", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-share_whith_others]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-share_whith_others]:last-child" }, type: "click" }, type: "X" }, { description: "Information storage and access", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-cookies]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-cookies]:last-child" }, type: "click" }, type: "D" }, { description: "Content selection, offers and marketing", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-CL-T1Rgm7]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-CL-T1Rgm7]:last-child" }, type: "click" }, type: "E" }, { description: "Analytics", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-analytics]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-analytics]:last-child" }, type: "click" }, type: "B" }, { description: "Analytics", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-M9NRHJe3G]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-M9NRHJe3G]:last-child" }, type: "click" }, type: "B" }, { description: "Ad and content selection", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-advertising_personalization]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-advertising_personalization]:last-child" }, type: "click" }, type: "F" }, { description: "Ad and content selection", falseAction: { parent: { childFilter: { target: { selector: "#didomi-purpose-pub-ciblee" } }, selector: ".didomi-consent-popup-data-processing, .didomi-components-accordion-label-container" }, target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-pub-ciblee]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-pub-ciblee]:last-child" }, type: "click" }, type: "F" }, { description: "Ad and content selection - basics", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-q4zlJqdcD]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-q4zlJqdcD]:last-child" }, type: "click" }, type: "F" }, { description: "Ad and content selection - partners and subsidiaries", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-partenaire-cAsDe8jC]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-partenaire-cAsDe8jC]:last-child" }, type: "click" }, type: "F" }, { description: "Ad and content selection - social networks", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-p4em9a8m]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-p4em9a8m]:last-child" }, type: "click" }, type: "F" }, { description: "Ad and content selection - others", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-autres-pub]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-autres-pub]:last-child" }, type: "click" }, type: "F" }, { description: "Social networks", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-reseauxsociaux]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-reseauxsociaux]:last-child" }, type: "click" }, type: "A" }, { description: "Social networks", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-social_media]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-social_media]:last-child" }, type: "click" }, type: "A" }, { description: "Content selection", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-content_personalization]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-content_personalization]:last-child" }, type: "click" }, type: "E" }, { description: "Ad delivery", falseAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-ad_delivery]:first-child" }, type: "click" }, trueAction: { target: { selector: ".didomi-components-radio__option[aria-describedby=didomi-purpose-ad_delivery]:last-child" }, type: "click" }, type: "F" }], type: "consent" }, { action: { consents: [{ matcher: { childFilter: { target: { selector: ":not(.didomi-components-radio__option--selected)" } }, type: "css" }, trueAction: { target: { selector: ":nth-child(2)" }, type: "click" }, falseAction: { target: { selector: ":first-child" }, type: "click" }, type: "X" }], type: "consent" }, target: { selector: ".didomi-components-radio" }, type: "foreach" }], type: "list" }, name: "DO_CONSENT" }, { action: { parent: { selector: ".didomi-consent-popup-footer .didomi-consent-popup-actions" }, target: { selector: ".didomi-components-button:first-child" }, type: "click" }, name: "SAVE_CONSENT" }] }, oil: { detectors: [{ presentMatcher: { target: { selector: ".as-oil-content-overlay" }, type: "css" }, showingMatcher: { target: { selector: ".as-oil-content-overlay" }, type: "css" } }], methods: [{ action: { actions: [{ target: { selector: ".as-js-advanced-settings" }, type: "click" }, { retries: "10", target: { selector: ".as-oil-cpc__purpose-container" }, type: "waitcss", waitTime: "250" }], type: "list" }, name: "OPEN_OPTIONS" }, { action: { actions: [{ consents: [{ matcher: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Information storage and access", "Opbevaring af og adgang til oplysninger p\xE5 din enhed"] }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Information storage and access", "Opbevaring af og adgang til oplysninger p\xE5 din enhed"] }, target: { selector: ".as-oil-cpc__switch" }, type: "click" }, type: "D" }, { matcher: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Personlige annoncer", "Personalisation"] }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Personlige annoncer", "Personalisation"] }, target: { selector: ".as-oil-cpc__switch" }, type: "click" }, type: "E" }, { matcher: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Annoncevalg, levering og rapportering", "Ad selection, delivery, reporting"] }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Annoncevalg, levering og rapportering", "Ad selection, delivery, reporting"] }, target: { selector: ".as-oil-cpc__switch" }, type: "click" }, type: "F" }, { matcher: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Personalisering af indhold", "Content selection, delivery, reporting"] }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Personalisering af indhold", "Content selection, delivery, reporting"] }, target: { selector: ".as-oil-cpc__switch" }, type: "click" }, type: "E" }, { matcher: { parent: { childFilter: { target: { selector: ".as-oil-cpc__purpose-header", textFilter: ["M\xE5ling", "Measurement"] } }, selector: ".as-oil-cpc__purpose-container" }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { childFilter: { target: { selector: ".as-oil-cpc__purpose-header", textFilter: ["M\xE5ling", "Measurement"] } }, selector: ".as-oil-cpc__purpose-container" }, target: { selector: ".as-oil-cpc__switch" }, type: "click" }, type: "B" }, { matcher: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: "Google" }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: "Google" }, target: { selector: ".as-oil-cpc__switch" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, name: "DO_CONSENT" }, { action: { target: { selector: ".as-oil__btn-optin" }, type: "click" }, name: "SAVE_CONSENT" }, { action: { target: { selector: "div.as-oil" }, type: "hide" }, name: "HIDE_CMP" }] }, optanon: { detectors: [{ presentMatcher: { target: { selector: "#optanon-menu, .optanon-alert-box-wrapper" }, type: "css" }, showingMatcher: { target: { displayFilter: true, selector: ".optanon-alert-box-wrapper" }, type: "css" } }], methods: [{ action: { actions: [{ target: { selector: ".optanon-alert-box-wrapper .optanon-toggle-display, a[onclick*='OneTrust.ToggleInfoDisplay()'], a[onclick*='Optanon.ToggleInfoDisplay()']" }, type: "click" }], type: "list" }, name: "OPEN_OPTIONS" }, { action: { actions: [{ target: { selector: ".preference-menu-item #Your-privacy" }, type: "click" }, { target: { selector: "#optanon-vendor-consent-text" }, type: "click" }, { action: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "X" }], type: "consent" }, target: { selector: "#optanon-vendor-consent-list .vendor-item" }, type: "foreach" }, { target: { selector: ".vendor-consent-back-link" }, type: "click" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-performance" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-performance" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "B" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-functional" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-functional" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "E" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-advertising" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-advertising" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-social" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-social" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "B" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Social Media Cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Social Media Cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "B" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Personalisation" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Personalisation" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "E" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Site monitoring cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Site monitoring cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "B" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Third party privacy-enhanced content" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Third party privacy-enhanced content" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "X" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Performance & Advertising Cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Performance & Advertising Cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Information storage and access" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Information storage and access" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "D" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Ad selection, delivery, reporting" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Ad selection, delivery, reporting" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Content selection, delivery, reporting" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Content selection, delivery, reporting" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "E" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Measurement" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Measurement" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "B" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Recommended Cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Recommended Cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "X" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Unclassified Cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Unclassified Cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "X" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Analytical Cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Analytical Cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "B" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Marketing Cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Marketing Cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Personalization" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Personalization" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "E" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Ad Selection, Delivery & Reporting" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Ad Selection, Delivery & Reporting" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Content Selection, Delivery & Reporting" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Content Selection, Delivery & Reporting" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "E" }], type: "consent" }], type: "list" }, type: "ifcss" }], type: "list" }, name: "DO_CONSENT" }, { action: { parent: { selector: ".optanon-save-settings-button" }, target: { selector: ".optanon-white-button-middle" }, type: "click" }, name: "SAVE_CONSENT" }, { action: { actions: [{ target: { selector: "#optanon-popup-wrapper" }, type: "hide" }, { target: { selector: "#optanon-popup-bg" }, type: "hide" }, { target: { selector: ".optanon-alert-box-wrapper" }, type: "hide" }], type: "list" }, name: "HIDE_CMP" }] }, quantcast2: { detectors: [{ presentMatcher: { target: { selector: "[data-tracking-opt-in-overlay]" }, type: "css" }, showingMatcher: { target: { selector: "[data-tracking-opt-in-overlay] [data-tracking-opt-in-learn-more]" }, type: "css" } }], methods: [{ action: { target: { selector: "[data-tracking-opt-in-overlay] [data-tracking-opt-in-learn-more]" }, type: "click" }, name: "OPEN_OPTIONS" }, { action: { actions: [{ type: "wait", waitTime: 500 }, { action: { actions: [{ target: { selector: "div", textFilter: ["Information storage and access"] }, trueAction: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "D" }], type: "consent" }, type: "ifcss" }, { target: { selector: "div", textFilter: ["Personalization"] }, trueAction: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "F" }], type: "consent" }, type: "ifcss" }, { target: { selector: "div", textFilter: ["Ad selection, delivery, reporting"] }, trueAction: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "F" }], type: "consent" }, type: "ifcss" }, { target: { selector: "div", textFilter: ["Content selection, delivery, reporting"] }, trueAction: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "E" }], type: "consent" }, type: "ifcss" }, { target: { selector: "div", textFilter: ["Measurement"] }, trueAction: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "B" }], type: "consent" }, type: "ifcss" }, { target: { selector: "div", textFilter: ["Other Partners"] }, trueAction: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "X" }], type: "consent" }, type: "ifcss" }], type: "list" }, parent: { childFilter: { target: { selector: "input" } }, selector: "[data-tracking-opt-in-overlay] > div > div" }, target: { childFilter: { target: { selector: "input" } }, selector: ":scope > div" }, type: "foreach" }], type: "list" }, name: "DO_CONSENT" }, { action: { target: { selector: "[data-tracking-opt-in-overlay] [data-tracking-opt-in-save]" }, type: "click" }, name: "SAVE_CONSENT" }] }, springer: { detectors: [{ presentMatcher: { parent: null, target: { selector: ".cmp-app_gdpr" }, type: "css" }, showingMatcher: { parent: null, target: { displayFilter: true, selector: ".cmp-popup_popup" }, type: "css" } }], methods: [{ action: { actions: [{ target: { selector: ".cmp-intro_rejectAll" }, type: "click" }, { type: "wait", waitTime: 250 }, { target: { selector: ".cmp-purposes_purposeItem:not(.cmp-purposes_selectedPurpose)" }, type: "click" }], type: "list" }, name: "OPEN_OPTIONS" }, { action: { consents: [{ matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Przechowywanie informacji na urz\u0105dzeniu lub dost\u0119p do nich", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Przechowywanie informacji na urz\u0105dzeniu lub dost\u0119p do nich", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "D" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Wyb\xF3r podstawowych reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Wyb\xF3r podstawowych reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "F" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Tworzenie profilu spersonalizowanych reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Tworzenie profilu spersonalizowanych reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "F" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Wyb\xF3r spersonalizowanych reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Wyb\xF3r spersonalizowanych reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "E" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Tworzenie profilu spersonalizowanych tre\u015Bci", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Tworzenie profilu spersonalizowanych tre\u015Bci", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "E" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Wyb\xF3r spersonalizowanych tre\u015Bci", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Wyb\xF3r spersonalizowanych tre\u015Bci", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "B" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Pomiar wydajno\u015Bci reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Pomiar wydajno\u015Bci reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "B" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Pomiar wydajno\u015Bci tre\u015Bci", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Pomiar wydajno\u015Bci tre\u015Bci", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "B" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Stosowanie bada\u0144 rynkowych w celu generowania opinii odbiorc\xF3w", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Stosowanie bada\u0144 rynkowych w celu generowania opinii odbiorc\xF3w", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "X" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Opracowywanie i ulepszanie produkt\xF3w", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Opracowywanie i ulepszanie produkt\xF3w", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "X" }], type: "consent" }, name: "DO_CONSENT" }, { action: { target: { selector: ".cmp-details_save" }, type: "click" }, name: "SAVE_CONSENT" }] }, wordpressgdpr: { detectors: [{ presentMatcher: { parent: null, target: { selector: ".wpgdprc-consent-bar" }, type: "css" }, showingMatcher: { parent: null, target: { displayFilter: true, selector: ".wpgdprc-consent-bar" }, type: "css" } }], methods: [{ action: { parent: null, target: { selector: ".wpgdprc-consent-bar .wpgdprc-consent-bar__settings", textFilter: null }, type: "click" }, name: "OPEN_OPTIONS" }, { action: { actions: [{ target: { selector: ".wpgdprc-consent-modal .wpgdprc-button", textFilter: "Eyeota" }, type: "click" }, { consents: [{ description: "Eyeota Cookies", matcher: { parent: { selector: ".wpgdprc-consent-modal__description", textFilter: "Eyeota" }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".wpgdprc-consent-modal__description", textFilter: "Eyeota" }, target: { selector: "label" }, type: "click" }, type: "X" }], type: "consent" }, { target: { selector: ".wpgdprc-consent-modal .wpgdprc-button", textFilter: "Advertising" }, type: "click" }, { consents: [{ description: "Advertising Cookies", matcher: { parent: { selector: ".wpgdprc-consent-modal__description", textFilter: "Advertising" }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".wpgdprc-consent-modal__description", textFilter: "Advertising" }, target: { selector: "label" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, name: "DO_CONSENT" }, { action: { parent: null, target: { selector: ".wpgdprc-button", textFilter: "Save my settings" }, type: "click" }, name: "SAVE_CONSENT" }] } };
3783
+ var consentomatic = { oil: { detectors: [{ presentMatcher: { target: { selector: ".as-oil-content-overlay" }, type: "css" }, showingMatcher: { target: { selector: ".as-oil-content-overlay" }, type: "css" } }], methods: [{ action: { actions: [{ target: { selector: ".as-js-advanced-settings" }, type: "click" }, { retries: "10", target: { selector: ".as-oil-cpc__purpose-container" }, type: "waitcss", waitTime: "250" }], type: "list" }, name: "OPEN_OPTIONS" }, { action: { actions: [{ consents: [{ matcher: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Information storage and access", "Opbevaring af og adgang til oplysninger p\xE5 din enhed"] }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Information storage and access", "Opbevaring af og adgang til oplysninger p\xE5 din enhed"] }, target: { selector: ".as-oil-cpc__switch" }, type: "click" }, type: "D" }, { matcher: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Personlige annoncer", "Personalisation"] }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Personlige annoncer", "Personalisation"] }, target: { selector: ".as-oil-cpc__switch" }, type: "click" }, type: "E" }, { matcher: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Annoncevalg, levering og rapportering", "Ad selection, delivery, reporting"] }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Annoncevalg, levering og rapportering", "Ad selection, delivery, reporting"] }, target: { selector: ".as-oil-cpc__switch" }, type: "click" }, type: "F" }, { matcher: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Personalisering af indhold", "Content selection, delivery, reporting"] }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: ["Personalisering af indhold", "Content selection, delivery, reporting"] }, target: { selector: ".as-oil-cpc__switch" }, type: "click" }, type: "E" }, { matcher: { parent: { childFilter: { target: { selector: ".as-oil-cpc__purpose-header", textFilter: ["M\xE5ling", "Measurement"] } }, selector: ".as-oil-cpc__purpose-container" }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { childFilter: { target: { selector: ".as-oil-cpc__purpose-header", textFilter: ["M\xE5ling", "Measurement"] } }, selector: ".as-oil-cpc__purpose-container" }, target: { selector: ".as-oil-cpc__switch" }, type: "click" }, type: "B" }, { matcher: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: "Google" }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".as-oil-cpc__purpose-container", textFilter: "Google" }, target: { selector: ".as-oil-cpc__switch" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, name: "DO_CONSENT" }, { action: { target: { selector: ".as-oil__btn-optin" }, type: "click" }, name: "SAVE_CONSENT" }, { action: { target: { selector: "div.as-oil" }, type: "hide" }, name: "HIDE_CMP" }] }, optanon: { detectors: [{ presentMatcher: { target: { selector: "#optanon-menu, .optanon-alert-box-wrapper" }, type: "css" }, showingMatcher: { target: { displayFilter: true, selector: ".optanon-alert-box-wrapper" }, type: "css" } }], methods: [{ action: { actions: [{ target: { selector: ".optanon-alert-box-wrapper .optanon-toggle-display, a[onclick*='OneTrust.ToggleInfoDisplay()'], a[onclick*='Optanon.ToggleInfoDisplay()']" }, type: "click" }], type: "list" }, name: "OPEN_OPTIONS" }, { action: { actions: [{ target: { selector: ".preference-menu-item #Your-privacy" }, type: "click" }, { target: { selector: "#optanon-vendor-consent-text" }, type: "click" }, { action: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "X" }], type: "consent" }, target: { selector: "#optanon-vendor-consent-list .vendor-item" }, type: "foreach" }, { target: { selector: ".vendor-consent-back-link" }, type: "click" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-performance" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-performance" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "B" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-functional" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-functional" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "E" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-advertising" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-advertising" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-social" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-social" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "B" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Social Media Cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Social Media Cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "B" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Personalisation" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Personalisation" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "E" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Site monitoring cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Site monitoring cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "B" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Third party privacy-enhanced content" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Third party privacy-enhanced content" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "X" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Performance & Advertising Cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Performance & Advertising Cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Information storage and access" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Information storage and access" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "D" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Ad selection, delivery, reporting" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Ad selection, delivery, reporting" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Content selection, delivery, reporting" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Content selection, delivery, reporting" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "E" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Measurement" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Measurement" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "B" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Recommended Cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Recommended Cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "X" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Unclassified Cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Unclassified Cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "X" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Analytical Cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Analytical Cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "B" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Marketing Cookies" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Marketing Cookies" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Personalization" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Personalization" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "E" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Ad Selection, Delivery & Reporting" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Ad Selection, Delivery & Reporting" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, type: "ifcss" }, { parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Content Selection, Delivery & Reporting" }, trueAction: { actions: [{ parent: { selector: "#optanon-menu, .optanon-menu" }, target: { selector: ".menu-item-necessary", textFilter: "Content Selection, Delivery & Reporting" }, type: "click" }, { consents: [{ matcher: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status input" }, type: "checkbox" }, toggleAction: { parent: { selector: "#optanon-popup-body-right" }, target: { selector: ".optanon-status label" }, type: "click" }, type: "E" }], type: "consent" }], type: "list" }, type: "ifcss" }], type: "list" }, name: "DO_CONSENT" }, { action: { parent: { selector: ".optanon-save-settings-button" }, target: { selector: ".optanon-white-button-middle" }, type: "click" }, name: "SAVE_CONSENT" }, { action: { actions: [{ target: { selector: "#optanon-popup-wrapper" }, type: "hide" }, { target: { selector: "#optanon-popup-bg" }, type: "hide" }, { target: { selector: ".optanon-alert-box-wrapper" }, type: "hide" }], type: "list" }, name: "HIDE_CMP" }] }, quantcast2: { detectors: [{ presentMatcher: { target: { selector: "[data-tracking-opt-in-overlay]" }, type: "css" }, showingMatcher: { target: { selector: "[data-tracking-opt-in-overlay] [data-tracking-opt-in-learn-more]" }, type: "css" } }], methods: [{ action: { target: { selector: "[data-tracking-opt-in-overlay] [data-tracking-opt-in-learn-more]" }, type: "click" }, name: "OPEN_OPTIONS" }, { action: { actions: [{ type: "wait", waitTime: 500 }, { action: { actions: [{ target: { selector: "div", textFilter: ["Information storage and access"] }, trueAction: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "D" }], type: "consent" }, type: "ifcss" }, { target: { selector: "div", textFilter: ["Personalization"] }, trueAction: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "F" }], type: "consent" }, type: "ifcss" }, { target: { selector: "div", textFilter: ["Ad selection, delivery, reporting"] }, trueAction: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "F" }], type: "consent" }, type: "ifcss" }, { target: { selector: "div", textFilter: ["Content selection, delivery, reporting"] }, trueAction: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "E" }], type: "consent" }, type: "ifcss" }, { target: { selector: "div", textFilter: ["Measurement"] }, trueAction: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "B" }], type: "consent" }, type: "ifcss" }, { target: { selector: "div", textFilter: ["Other Partners"] }, trueAction: { consents: [{ matcher: { target: { selector: "input" }, type: "checkbox" }, toggleAction: { target: { selector: "label" }, type: "click" }, type: "X" }], type: "consent" }, type: "ifcss" }], type: "list" }, parent: { childFilter: { target: { selector: "input" } }, selector: "[data-tracking-opt-in-overlay] > div > div" }, target: { childFilter: { target: { selector: "input" } }, selector: ":scope > div" }, type: "foreach" }], type: "list" }, name: "DO_CONSENT" }, { action: { target: { selector: "[data-tracking-opt-in-overlay] [data-tracking-opt-in-save]" }, type: "click" }, name: "SAVE_CONSENT" }] }, springer: { detectors: [{ presentMatcher: { parent: null, target: { selector: ".cmp-app_gdpr" }, type: "css" }, showingMatcher: { parent: null, target: { displayFilter: true, selector: ".cmp-popup_popup" }, type: "css" } }], methods: [{ action: { actions: [{ target: { selector: ".cmp-intro_rejectAll" }, type: "click" }, { type: "wait", waitTime: 250 }, { target: { selector: ".cmp-purposes_purposeItem:not(.cmp-purposes_selectedPurpose)" }, type: "click" }], type: "list" }, name: "OPEN_OPTIONS" }, { action: { consents: [{ matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Przechowywanie informacji na urz\u0105dzeniu lub dost\u0119p do nich", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Przechowywanie informacji na urz\u0105dzeniu lub dost\u0119p do nich", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "D" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Wyb\xF3r podstawowych reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Wyb\xF3r podstawowych reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "F" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Tworzenie profilu spersonalizowanych reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Tworzenie profilu spersonalizowanych reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "F" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Wyb\xF3r spersonalizowanych reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Wyb\xF3r spersonalizowanych reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "E" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Tworzenie profilu spersonalizowanych tre\u015Bci", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Tworzenie profilu spersonalizowanych tre\u015Bci", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "E" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Wyb\xF3r spersonalizowanych tre\u015Bci", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Wyb\xF3r spersonalizowanych tre\u015Bci", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "B" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Pomiar wydajno\u015Bci reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Pomiar wydajno\u015Bci reklam", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "B" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Pomiar wydajno\u015Bci tre\u015Bci", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Pomiar wydajno\u015Bci tre\u015Bci", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "B" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Stosowanie bada\u0144 rynkowych w celu generowania opinii odbiorc\xF3w", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Stosowanie bada\u0144 rynkowych w celu generowania opinii odbiorc\xF3w", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "X" }, { matcher: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Opracowywanie i ulepszanie produkt\xF3w", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch .cmp-switch_isSelected" }, type: "css" }, toggleAction: { parent: { selector: ".cmp-purposes_detailHeader", textFilter: "Opracowywanie i ulepszanie produkt\xF3w", childFilter: { target: { selector: ".cmp-switch_switch" } } }, target: { selector: ".cmp-switch_switch:not(.cmp-switch_isSelected)" }, type: "click" }, type: "X" }], type: "consent" }, name: "DO_CONSENT" }, { action: { target: { selector: ".cmp-details_save" }, type: "click" }, name: "SAVE_CONSENT" }] }, wordpressgdpr: { detectors: [{ presentMatcher: { parent: null, target: { selector: ".wpgdprc-consent-bar" }, type: "css" }, showingMatcher: { parent: null, target: { displayFilter: true, selector: ".wpgdprc-consent-bar" }, type: "css" } }], methods: [{ action: { parent: null, target: { selector: ".wpgdprc-consent-bar .wpgdprc-consent-bar__settings", textFilter: null }, type: "click" }, name: "OPEN_OPTIONS" }, { action: { actions: [{ target: { selector: ".wpgdprc-consent-modal .wpgdprc-button", textFilter: "Eyeota" }, type: "click" }, { consents: [{ description: "Eyeota Cookies", matcher: { parent: { selector: ".wpgdprc-consent-modal__description", textFilter: "Eyeota" }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".wpgdprc-consent-modal__description", textFilter: "Eyeota" }, target: { selector: "label" }, type: "click" }, type: "X" }], type: "consent" }, { target: { selector: ".wpgdprc-consent-modal .wpgdprc-button", textFilter: "Advertising" }, type: "click" }, { consents: [{ description: "Advertising Cookies", matcher: { parent: { selector: ".wpgdprc-consent-modal__description", textFilter: "Advertising" }, target: { selector: "input" }, type: "checkbox" }, toggleAction: { parent: { selector: ".wpgdprc-consent-modal__description", textFilter: "Advertising" }, target: { selector: "label" }, type: "click" }, type: "F" }], type: "consent" }], type: "list" }, name: "DO_CONSENT" }, { action: { parent: null, target: { selector: ".wpgdprc-button", textFilter: "Save my settings" }, type: "click" }, name: "SAVE_CONSENT" }] } };
3771
3784
 
3772
3785
  // playwright/content.ts
3773
3786
  if (!window.autoconsentReceiveMessage) {
@@ -1,5 +1,7 @@
1
1
  export declare const snippets: {
2
2
  EVAL_0: () => void;
3
+ EVAL_DIDOMI_OPT_OUT: () => boolean;
4
+ EVAL_DIDOMI_TEST: () => boolean;
3
5
  EVAL_CONSENTMANAGER_1: () => any;
4
6
  EVAL_CONSENTMANAGER_2: () => boolean;
5
7
  EVAL_CONSENTMANAGER_3: () => any;
@@ -0,0 +1,82 @@
1
+ # Using Autoconsent with Puppeteer
2
+
3
+ Autoconsent can be used with [Puppeteer](https://pptr.dev) via the bundled `dist/autoconsent.playwright.js` script. This self-contained IIFE expects two globals:
4
+
5
+ - `window.autoconsentSendMessage` — used by the content script to send messages from the page to Node.
6
+ - `window.autoconsentReceiveMessage` — used by Node to send messages back into the page.
7
+
8
+ Puppeteer's `page.exposeFunction` and `page.evaluateOnNewDocument` bridge the gap.
9
+
10
+ ```javascript
11
+ const puppeteer = require('puppeteer')
12
+ const path = require('path')
13
+ const fs = require('fs')
14
+
15
+ const autoconsentScript = fs.readFileSync(
16
+ path.resolve(
17
+ path.dirname(require.resolve('@duckduckgo/autoconsent')),
18
+ 'autoconsent.playwright.js'
19
+ ),
20
+ 'utf8'
21
+ )
22
+
23
+ // See https://github.com/duckduckgo/autoconsent/blob/main/api.md
24
+ const autoconsentConfig = {
25
+ enabled: true,
26
+ autoAction: 'optOut',
27
+ enablePrehide: true,
28
+ enableCosmeticRules: true,
29
+ enableGeneratedRules: true,
30
+ enableHeuristicAction: true,
31
+ detectRetries: 20,
32
+ }
33
+
34
+ const sendMessage = (page, message) =>
35
+ page
36
+ .evaluate(msg => {
37
+ if (window.autoconsentReceiveMessage) {
38
+ return window.autoconsentReceiveMessage(msg)
39
+ }
40
+ }, message)
41
+ .catch(() => {})
42
+
43
+ async function setupAutoconsent(page) {
44
+ await page.exposeFunction('autoconsentSendMessage', async message => {
45
+ if (!message || typeof message !== 'object') return
46
+
47
+ if (message.type === 'init') {
48
+ return sendMessage(page, { type: 'initResp', config: autoconsentConfig })
49
+ }
50
+
51
+ if (message.type === 'eval') {
52
+ const result = await page.evaluate(message.code)
53
+ return sendMessage(page, { type: 'evalResp', id: message.id, result })
54
+ }
55
+ })
56
+
57
+ await page.evaluateOnNewDocument(autoconsentScript)
58
+ }
59
+
60
+ ;(async () => {
61
+ const browser = await puppeteer.launch({ headless: 'new' })
62
+ const page = await browser.newPage()
63
+
64
+ await setupAutoconsent(page)
65
+ await page.goto('https://example.com', { waitUntil: 'load' })
66
+
67
+ // Re-run on the current document in case the page was already loaded
68
+ // before evaluateOnNewDocument had a chance to fire
69
+ await page.evaluate(autoconsentScript).catch(() => {})
70
+
71
+ // … continue with your automation
72
+ await browser.close()
73
+ })()
74
+ ```
75
+
76
+ ## How it works
77
+
78
+ 1. **`page.exposeFunction`** binds `window.autoconsentSendMessage` in the page, giving the content script a way to call back into Node.
79
+ 2. **`page.evaluateOnNewDocument`** injects the content script so it runs before any page JavaScript, enabling early CMP detection and prehiding.
80
+ 3. When the content script starts, it sends an `init` message. The Node-side handler replies with `initResp` containing the config, which triggers CMP detection and automatic opt-out.
81
+ 4. `eval` messages are handled by running `page.evaluate(message.code)` in the main world, matching how the [Playwright test runner](./playwright/runner.ts) handles them.
82
+ 5. A post-navigation `page.evaluate(autoconsentScript)` re-triggers the script on the current document, covering cases where the page loaded before the `evaluateOnNewDocument` hook was set up.
@@ -4,6 +4,19 @@
4
4
  export const snippets = {
5
5
  // code-based rules
6
6
  EVAL_0: () => console.log(1),
7
+ EVAL_DIDOMI_OPT_OUT: () => {
8
+ if (window.Didomi) {
9
+ window.Didomi.setUserDisagreeToAll();
10
+ return true;
11
+ }
12
+ return false;
13
+ },
14
+ EVAL_DIDOMI_TEST: () => {
15
+ if (window.Didomi) {
16
+ return window.Didomi.getUserConsentStatusForAll().purposes.disabled.length > 0;
17
+ }
18
+ return false;
19
+ },
7
20
  EVAL_CONSENTMANAGER_1: () => window.__cmp && typeof __cmp('getCMPData') === 'object',
8
21
  EVAL_CONSENTMANAGER_2: () => !__cmp('consentStatus').userChoiceExists,
9
22
  EVAL_CONSENTMANAGER_3: () => __cmp('setConsent', 0),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckduckgo/autoconsent",
3
- "version": "14.69.0",
3
+ "version": "14.71.0",
4
4
  "description": "",
5
5
  "types": "./dist/types/web.d.ts",
6
6
  "exports": {
package/readme.md CHANGED
@@ -61,6 +61,10 @@ npm run watch
61
61
 
62
62
  This will rebuild the extension on every source file change. You still need to refresh the extension in the browser to see the changes.
63
63
 
64
+ ## Using with Puppeteer
65
+
66
+ See [puppeteer.md](./docs/puppeteer.md) for a full integration guide.
67
+
64
68
  ## Rules
65
69
 
66
70
  The library's functionality is implemented as a set of rules that define how to manage consent on
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "consentmo",
3
+ "prehideSelectors": ["csm-cookie-consent"],
4
+ "detectCmp": [
5
+ {
6
+ "exists": ["csm-cookie-consent", ".csm-wrapper"]
7
+ }
8
+ ],
9
+ "detectPopup": [
10
+ {
11
+ "visible": ["csm-cookie-consent", ".csm-wrapper button"]
12
+ }
13
+ ],
14
+ "optIn": [
15
+ {
16
+ "waitForThenClick": ["csm-cookie-consent", ".csm-wrapper .cc-allow"]
17
+ }
18
+ ],
19
+ "optOut": [
20
+ {
21
+ "if": { "exists": ["csm-cookie-consent", ".csm-wrapper .cc-deny"] },
22
+ "then": [
23
+ {
24
+ "waitForThenClick": ["csm-cookie-consent", ".csm-wrapper .cc-deny"]
25
+ }
26
+ ],
27
+ "else": [
28
+ {
29
+ "waitForThenClick": ["csm-cookie-consent", ".csm-wrapper .cc-settings"]
30
+ },
31
+ {
32
+ "waitForThenClick": ["csm-cookie-consent", ".csm-wrapper .cc-deny"]
33
+ }
34
+ ]
35
+ }
36
+ ],
37
+ "test": [
38
+ {
39
+ "waitForVisible": ["csm-cookie-consent", ".csm-wrapper button"],
40
+ "timeout": 1000,
41
+ "check": "none"
42
+ }
43
+ ]
44
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "didomi",
3
+ "prehideSelectors": [
4
+ "#didomi-popup,.didomi-popup-container,.didomi-popup-notice,.didomi-consent-popup-preferences,#didomi-notice,.didomi-popup-backdrop,.didomi-screen-medium"
5
+ ],
6
+ "detectCmp": [{ "visible": "#didomi-host" }],
7
+ "detectPopup": [
8
+ {
9
+ "visible": "#didomi-popup, #didomi-notice, .didomi-popup-notice, .didomi-notice-banner",
10
+ "check": "any"
11
+ }
12
+ ],
13
+ "optIn": [{ "waitForThenClick": "#didomi-notice-agree-button" }],
14
+ "optOut": [
15
+ {
16
+ "if": { "exists": "#didomi-notice-disagree-button,.didomi-continue-without-agreeing" },
17
+ "then": [{ "waitForThenClick": "#didomi-notice-disagree-button,.didomi-continue-without-agreeing" }],
18
+ "else": [{ "eval": "EVAL_DIDOMI_OPT_OUT" }]
19
+ }
20
+ ],
21
+ "test": [{ "eval": "EVAL_DIDOMI_TEST" }]
22
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "gallup",
3
+ "prehideSelectors": ["[class*=\"gcb-modal-overlay\"]"],
4
+ "detectCmp": [{ "exists": "[data-gcb-modal-show-prefs]" }],
5
+ "detectPopup": [{ "visible": "[data-gcb-modal-show-prefs]" }],
6
+ "optOut": [{ "waitForThenClick": "[data-gcb-modal-show-prefs]" }, { "wait": 500 }, { "waitForThenClick": "[data-gcb-modal-save]" }],
7
+ "optIn": [{ "waitForThenClick": "[data-gcb-modal-accept]" }],
8
+ "test": [{ "cookieContains": "gcbcl=a3|m3" }]
9
+ }
@@ -28,7 +28,7 @@
28
28
  {
29
29
  "waitForThenClick": [
30
30
  "div[consent-skip-blocker=\"1\"][id][data-bg] > dialog > div > div > div > div > div > a[role=button]:not([id])",
31
- "xpath///span[contains(., ' ohne ') or contains(., 'without')]"
31
+ "xpath///span[contains(., ' ohne ') or contains(., 'without') or contains(., 'Ablehnen')]"
32
32
  ]
33
33
  }
34
34
  ],
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "squarespace-cookie-banner",
3
+ "prehideSelectors": [".cookie-banner-mount-point"],
4
+ "detectCmp": [
5
+ {
6
+ "exists": ".cookie-banner-mount-point section[aria-label='Cookie banner']"
7
+ }
8
+ ],
9
+ "detectPopup": [
10
+ {
11
+ "visible": ".cookie-banner-mount-point section[aria-label='Cookie banner']"
12
+ }
13
+ ],
14
+ "optIn": [
15
+ {
16
+ "waitForThenClick": ".cookie-banner-mount-point button.accept"
17
+ }
18
+ ],
19
+ "optOut": [
20
+ {
21
+ "waitForThenClick": ".cookie-banner-mount-point button.decline"
22
+ }
23
+ ],
24
+ "test": [
25
+ {
26
+ "waitForVisible": ".cookie-banner-mount-point section[aria-label='Cookie banner']",
27
+ "timeout": 1000,
28
+ "check": "none"
29
+ }
30
+ ]
31
+ }
package/rules/build.ts CHANGED
@@ -32,7 +32,7 @@ export async function buildConsentOMaticRules() {
32
32
  // fetch ConsentOMatic rule set and merge with our custom rules
33
33
  const consentOMaticCommit = '7d7fd2bd6bf2b662350b0eaeca74db6eba155efe';
34
34
  const consentOMaticUrl = `https://raw.githubusercontent.com/cavi-au/Consent-O-Matic/${consentOMaticCommit}/Rules.json`;
35
- const consentOMaticInclude = ['didomi.io', 'oil', 'optanon', 'quantcast2', 'springer', 'wordpressgdpr'];
35
+ const consentOMaticInclude = ['oil', 'optanon', 'quantcast2', 'springer', 'wordpressgdpr'];
36
36
  const comRules: Record<string, object> = {};
37
37
  const allComRules: Record<string, object> = await new Promise((resolve) => {
38
38
  https.get(consentOMaticUrl, (res) => {