@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
40 lines • 1.31 kB
JSON
{
"name": "Wikia",
"detectCmp": [{ "exists": "div[data-tracking-opt-in-overlay=\"true\"]" }],
"detectPopup": [
{
"exists": "button[data-tracking-opt-in-learn-more=\"true\"],div[data-tracking-opt-in-learn-more=\"true\"]"
}
],
"optIn": [
{
"click": "button[data-tracking-opt-in-learn-more=\"true\"],div[data-tracking-opt-in-learn-more=\"true\"]"
},
{
"click": "button[data-tracking-opt-in-save=\"true\"],div[data-tracking-opt-in-save=\"true\"]"
}
],
"optOut": [
{
"click": "button[data-tracking-opt-in-learn-more=\"true\"],div[data-tracking-opt-in-learn-more=\"true\"]"
},
{ "waitFor": "input[id^=\"switch_\"]", "wait": 500 },
{ "click": "input[id^=\"switch_\"]:checked" },
{ "click": "input[id^=\"switch_\"]:checked" },
{ "click": "input[id^=\"switch_\"]:checked" },
{ "click": "input[id^=\"switch_\"]:checked" },
{ "click": "input[id^=\"switch_\"]:checked" },
{
"click": "button[data-tracking-opt-in-save=\"true\"],div[data-tracking-opt-in-save=\"true\"]"
}
],
"test": [
{
"eval": "__cmp('getVendorConsents', undefined, r => window.__rcsResult = r) || true"
},
{ "wait": 500 },
{
"eval": "Object.values(window.__rcsResult.purposeConsents).every(c => !c)"
}
]
}