UNPKG

@cliqz/autoconsent

Version:

This is a library of rules for navigating through common consent popups on the web. These rules can be run in a Firefox webextension, or in a puppeteer orchestrated headless browser. Using these rules, opt-in and opt-out options can be selected automatica

25 lines (24 loc) 1.01 kB
{ "name": "Onetrust", "prehideSelectors": ["#onetrust-banner-sdk,#onetrust-consent-sdk,.optanon-alert-box-wrapper,.onetrust-pc-dark-filter,.js-consent-banner"], "isHidingRule": true, "detectCmp": [{ "exists": "#onetrust-banner-sdk,.optanon-alert-box-wrapper" }], "detectPopup": [{ "visible": "#onetrust-banner-sdk,.optanon-alert-box-wrapper" }], "optOut": [ { "click": "#onetrust-pc-btn-handler,.ot-sdk-show-settings,button.js-cookie-settings" }, { "waitFor": "#onetrust-consent-sdk", "timeout": 2000 }, { "wait": 1000 }, { "click": "#onetrust-consent-sdk input.category-switch-handler:checked,.js-editor-toggle-state:checked", "all": true, "optional": true }, { "waitForThenClick": ".save-preference-btn-handler,.js-consent-save", "timeout": 1000 } ], "optIn": [{ "click": "onetrust-accept-btn-handler,js-accept-cookies" }], "test": [ { "eval": "window.OnetrustActiveGroups.split(',').filter(s => s.length > 0).length <= 1" } ] }