@duckduckgo/autoconsent 12.20.0 → 13.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.
Files changed (36) hide show
  1. package/.github/workflows/release.yml +0 -9
  2. package/CHANGELOG.md +28 -0
  3. package/dist/addon-firefox/background.bundle.js +4 -0
  4. package/dist/addon-firefox/content.bundle.js +103 -9
  5. package/dist/addon-firefox/manifest.json +1 -1
  6. package/dist/addon-firefox/rules.json +1 -13537
  7. package/dist/addon-mv3/background.bundle.js +4 -0
  8. package/dist/addon-mv3/content.bundle.js +103 -9
  9. package/dist/addon-mv3/manifest.json +1 -1
  10. package/dist/addon-mv3/rules.json +1 -13537
  11. package/dist/autoconsent.cjs.js +103 -9
  12. package/dist/autoconsent.esm.js +103 -9
  13. package/dist/autoconsent.extra.cjs.js +103 -9
  14. package/dist/autoconsent.extra.esm.js +103 -9
  15. package/dist/autoconsent.playwright.js +105 -13549
  16. package/lib/cmps/base.ts +2 -2
  17. package/lib/cmps/onetrust.ts +0 -10
  18. package/lib/encoding.ts +204 -0
  19. package/lib/rules.ts +3 -0
  20. package/lib/types.ts +2 -0
  21. package/lib/web.ts +15 -2
  22. package/package.json +7 -4
  23. package/readme.md +4 -3
  24. package/rules/autoconsent/cookiecuttr.json +1 -2
  25. package/rules/autoconsent/squiz.json +1 -2
  26. package/rules/autoconsent/summitracing.json +1 -2
  27. package/rules/autoconsent/toyota.json +1 -2
  28. package/rules/autoconsent/twcc.json +1 -2
  29. package/rules/{build.mjs → build.ts} +15 -15
  30. package/rules/compact-rules.json +1 -0
  31. package/rules/consentomatic.json +1 -0
  32. package/rules/rules.json +1 -13537
  33. package/scripts/bundle-config-rules.mjs +18 -0
  34. package/tests-wtr/rules/rule-compaction.test.ts +103 -0
  35. package/web-test-runner.config.mjs +1 -0
  36. package/rules/watch-build.mjs +0 -15
@@ -39,12 +39,3 @@ jobs:
39
39
  - name: Remember git tag
40
40
  id: remember_tag
41
41
  run: echo "tag_name=$(git describe --exact-match --tags)" >> "$GITHUB_OUTPUT"
42
-
43
- ddg-release:
44
- name: Propagate to DDG apps
45
- needs: release
46
- if: ${{ !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci') && needs.release.outputs.tag_name != '' }}
47
- uses: ./.github/workflows/ddg-release.yml
48
- secrets: inherit
49
- with:
50
- tag_name: ${{ needs.release.outputs.tag_name }}
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ # v13.0.0 (Mon May 19 2025)
2
+
3
+ #### 💥 Breaking Change
4
+
5
+ - Compact rule format [#743](https://github.com/duckduckgo/autoconsent/pull/743) ([@sammacbeth](https://github.com/sammacbeth))
6
+
7
+ #### 🐛 Bug Fix
8
+
9
+ - Disable auto release to native apps [#747](https://github.com/duckduckgo/autoconsent/pull/747) ([@sammacbeth](https://github.com/sammacbeth))
10
+
11
+ #### Authors: 1
12
+
13
+ - Sam Macbeth ([@sammacbeth](https://github.com/sammacbeth))
14
+
15
+ ---
16
+
17
+ # v12.20.1 (Fri May 16 2025)
18
+
19
+ #### 🐛 Bug Fix
20
+
21
+ - Fix onetrust rule [#746](https://github.com/duckduckgo/autoconsent/pull/746) ([@muodov](https://github.com/muodov))
22
+
23
+ #### Authors: 1
24
+
25
+ - Maxim Tsoy ([@muodov](https://github.com/muodov))
26
+
27
+ ---
28
+
1
29
  # v12.20.0 (Fri May 16 2025)
2
30
 
3
31
  #### 🚀 Enhancement
@@ -768,6 +768,9 @@
768
768
  return !storedExceptions.includes(parsed.domain);
769
769
  }
770
770
 
771
+ // rules/consentomatic.json
772
+ 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" }] } };
773
+
771
774
  // addon/background.ts
772
775
  var openDevToolsPanels = /* @__PURE__ */ new Map();
773
776
  async function loadRules() {
@@ -840,6 +843,7 @@
840
843
  console.groupEnd();
841
844
  }
842
845
  const rules = await storageGet("rules");
846
+ rules.consentomatic = consentomatic;
843
847
  switch (msg.type) {
844
848
  case "init":
845
849
  if (frameId === 0) {
@@ -629,7 +629,7 @@
629
629
  mainWorldEval(snippetId) {
630
630
  const snippet = snippets[snippetId];
631
631
  if (!snippet) {
632
- console.warn("Snippet not found", snippetId);
632
+ this.autoconsent.config.logs.errors && console.warn("Snippet not found", snippetId);
633
633
  return Promise.resolve(false);
634
634
  }
635
635
  const logsConfig = this.autoconsent.config.logs;
@@ -748,7 +748,7 @@
748
748
  this.runContext = rule.runContext || defaultRunContext;
749
749
  }
750
750
  get hasSelfTest() {
751
- return !!this.rule.test;
751
+ return !!this.rule.test && this.rule.test.length > 0;
752
752
  }
753
753
  get isIntermediate() {
754
754
  return !!this.rule.intermediate;
@@ -954,6 +954,9 @@
954
954
  }
955
955
  };
956
956
 
957
+ // lib/rules.ts
958
+ var SUPPORTED_RULE_STEP_VERSION = 1;
959
+
957
960
  // lib/utils.ts
958
961
  function getStyleElement(styleOverrideElementId = "autoconsent-css-rules") {
959
962
  const styleSelector = `style#${styleOverrideElementId}`;
@@ -1494,9 +1497,6 @@
1494
1497
  super(...arguments);
1495
1498
  this.name = "Onetrust";
1496
1499
  this.prehideSelectors = ["#onetrust-banner-sdk,#onetrust-consent-sdk,.onetrust-pc-dark-filter,.js-consent-banner"];
1497
- this.runContext = {
1498
- urlPattern: "^(?!.*https://www\\.nba\\.com/)"
1499
- };
1500
1500
  }
1501
1501
  get hasSelfTest() {
1502
1502
  return true;
@@ -1507,9 +1507,6 @@
1507
1507
  get isCosmetic() {
1508
1508
  return false;
1509
1509
  }
1510
- hasMatchingUrlPattern() {
1511
- return false;
1512
- }
1513
1510
  async detectCmp() {
1514
1511
  return this.elementExists("#onetrust-banner-sdk,#onetrust-pc-sdk");
1515
1512
  }
@@ -12503,6 +12500,93 @@ ${createStylesheet([filter.getSelector()], filter.hasCustomStyle() ? filter.getS
12503
12500
  return { patterns, snippets: snippets2 };
12504
12501
  }
12505
12502
 
12503
+ // lib/encoding.ts
12504
+ var compactedRuleSteps = [
12505
+ ["exists", "e"],
12506
+ ["visible", "v"],
12507
+ ["waitForThenClick", "c"],
12508
+ ["click", "k"],
12509
+ ["waitFor", "w"],
12510
+ ["waitForVisible", "wv"],
12511
+ ["hide", "h"],
12512
+ ["cookieContains", "cc"]
12513
+ ];
12514
+ function decodeNullableBoolean(value) {
12515
+ if (value === 1) {
12516
+ return true;
12517
+ }
12518
+ if (value === 0) {
12519
+ return false;
12520
+ }
12521
+ return void 0;
12522
+ }
12523
+ function decodeRules(encoded) {
12524
+ if (encoded.v > 1) {
12525
+ throw new Error("Unsupported rule format.");
12526
+ }
12527
+ function decodeRuleStep(step) {
12528
+ const clonedStep = { ...step };
12529
+ for (const [longKey, shortKey] of compactedRuleSteps) {
12530
+ if (clonedStep[shortKey] !== void 0) {
12531
+ clonedStep[longKey] = encoded.s[clonedStep[shortKey]];
12532
+ delete clonedStep[shortKey];
12533
+ }
12534
+ }
12535
+ if (clonedStep.if) {
12536
+ clonedStep.if = decodeRuleStep(step.if);
12537
+ clonedStep.then = step.then && step.then.map(decodeRuleStep);
12538
+ if (step.else) {
12539
+ clonedStep.else = step.else.map(decodeRuleStep);
12540
+ }
12541
+ }
12542
+ if (clonedStep.any) {
12543
+ clonedStep.any = step.any.map(decodeRuleStep);
12544
+ }
12545
+ return { ...clonedStep };
12546
+ }
12547
+ return encoded.r.filter((r) => r[0] <= SUPPORTED_RULE_STEP_VERSION).map((rule) => {
12548
+ const [
12549
+ minimumRuleStepVersion,
12550
+ name,
12551
+ cosmetic,
12552
+ urlPattern,
12553
+ mainFrame,
12554
+ prehideSelectors,
12555
+ detectCmp,
12556
+ detectPopup,
12557
+ optOut,
12558
+ test,
12559
+ extra
12560
+ ] = rule;
12561
+ const optIn = [];
12562
+ const runContext = {};
12563
+ const runInMainFrame = decodeNullableBoolean(Math.floor(mainFrame / 10) % 10);
12564
+ const runInSubFrame = decodeNullableBoolean(mainFrame % 10);
12565
+ if (runInMainFrame !== void 0) {
12566
+ runContext.main = runInMainFrame;
12567
+ }
12568
+ if (runInSubFrame !== void 0) {
12569
+ runContext.frame = runInSubFrame;
12570
+ }
12571
+ if (urlPattern !== "") {
12572
+ runContext.urlPattern = urlPattern;
12573
+ }
12574
+ return {
12575
+ name,
12576
+ cosmetic: decodeNullableBoolean(cosmetic),
12577
+ runContext,
12578
+ prehideSelectors: prehideSelectors.map((i) => encoded.s[i].toString()),
12579
+ detectCmp: detectCmp.map(decodeRuleStep),
12580
+ detectPopup: detectPopup.map(decodeRuleStep),
12581
+ optOut: optOut.map(decodeRuleStep),
12582
+ optIn,
12583
+ test: test?.map(decodeRuleStep),
12584
+ minimumRuleStepVersion: minimumRuleStepVersion || void 0,
12585
+ ...extra
12586
+ };
12587
+ });
12588
+ }
12589
+
12506
12590
  // lib/web.ts
12507
12591
  function filterCMPs(rules, config) {
12508
12592
  return rules.filter((cmp) => {
@@ -12631,9 +12715,19 @@ ${createStylesheet([filter.getSelector()], filter.hasCustomStyle() ? filter.getS
12631
12715
  this.addDeclarativeCMP(ruleset);
12632
12716
  });
12633
12717
  }
12718
+ if (declarativeRules.compact) {
12719
+ try {
12720
+ const rules = decodeRules(declarativeRules.compact);
12721
+ rules.forEach(this.addDeclarativeCMP.bind(this));
12722
+ } catch (e) {
12723
+ this.config.logs.errors && console.error(e);
12724
+ }
12725
+ }
12634
12726
  }
12635
12727
  addDeclarativeCMP(ruleset) {
12636
- this.rules.push(new AutoConsentCMP(ruleset, this));
12728
+ if ((ruleset.minimumRuleStepVersion || 1) <= SUPPORTED_RULE_STEP_VERSION) {
12729
+ this.rules.push(new AutoConsentCMP(ruleset, this));
12730
+ }
12637
12731
  }
12638
12732
  addConsentomaticCMP(name, config) {
12639
12733
  this.rules.push(new ConsentOMaticCMP(`com_${name}`, config));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 2,
3
3
  "name": "Autoconsent",
4
- "version": "2025.5.7",
4
+ "version": "2025.5.16",
5
5
  "background": {
6
6
  "scripts": [
7
7
  "background.bundle.js"