Consent-O-Matic
Consent-O-Matic copied to clipboard
Add support for "Admiral" powered sites
Hi,
It would be great if the plugin could support sites powered by Admiral Example site: https://www.dwell.com/
This one's particularly agressive insofar that it forces you to manually untick every single one of the legitimate interest partners.

If anyone ever picks this one up. A couple of intersesting observations with this one.
So the checkboxes are structured as follows:
<label class="Toggle__Label-sc-1gq6yqj-0 CUxxz">
<input type="checkbox" style="border: 0px; clip: rect(0px, 0px, 0px, 0px);
height: 1px; width: 1px; margin: -1px; padding: 0px; overflow: hidden; position: absolute;">
<span class="Toggle__Container-sc-1gq6yqj-1 dycmHo">
<span class="Toggle__StyledToggle-sc-1gq6yqj-2 kpdzoh">
<svg width="1em" height="1em" viewBox="0 0 12 9" fill="none" class="checkmark checked" aria-hidden="true"><rect x="1.5" y="3" width="6.364" height="2.121" rx="1" transform="rotate(45 1.5 3)" fill="currentColor"></rect><rect x="12" y="1.5" width="10.607" height="2.121" rx="1" transform="rotate(135 12 1.5)" fill="currentColor"></rect></svg>
</span>
</span>
<span class="Text-azid7f-0 PartnersLayer__IABToggleText-tonkui-2 jIDGWj eSdtoC">Legitimate Interest</span></label>
Depending on how far down that looong list you've scrolled the follwing will give you a different answer.
document.querySelectorAll("label.CUxxz > input[type=checkbox]").length
As a result doing something like .click()
on those checkboxes will not necessarily click all of them.
var inputs = document.querySelectorAll("label.CUxxz > input[type=checkbox]");
var j = 0;
for (var i=0; i < inputs.length; i++) {
if (inputs[i].checked) {
inputs[i].click();
j++;
}
}
console.log(j);
I don't know if that's relevant, but if it is I suspect that there's some notions of scrolling, elements being visible or in view, or lazy loading involved. It could be a purposeful means of combating tools like this plugin.
Interested in anyone's view on that.