@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
24 lines (23 loc) • 903 B
JSON
{
"name": "Onetrust",
"detectCmp": [{ "exists": "#onetrust-banner-sdk,.optanon-alert-box-wrapper" }],
"detectPopup": [{ "visible": "#onetrust-banner-sdk,.optanon-alert-box-wrapper" }],
"optOut": [
{ "hide": ["#onetrust-banner-sdk", "#onetrust-consent-sdk"] },
{ "click": "#onetrust-pc-btn-handler,.ot-sdk-show-settings,.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"
}
]
}