Skip to content

Instantly share code, notes, and snippets.

@MayeulC
Created December 13, 2019 11:00
Show Gist options
  • Save MayeulC/5c7219bba6b546dd7d21c5d3573f0b38 to your computer and use it in GitHub Desktop.
Save MayeulC/5c7219bba6b546dd7d21c5d3573f0b38 to your computer and use it in GitHub Desktop.
Microsoft consent fix
/* There is no way I am clicking manually trough all of these checkboxes
Outlook presented me a list of more than 500 ad and tracking providers with no way to disable them all.
The world is becoming a terrible place. GAFAM are the vilains */
// p here was obtained by opening the inspector and selecting "use in console" on the provider list
//First try:
//for (let key in p.getElementsByClassName("is-checked")) {
// p.getElementsByClassName("is-checked")[key].getElementsByTagName("button")[0].click()
//}
//list = p.getElementsByClassName("is-checked")
//for (i=0; i< list.length; i++) { list[i].getElementsByTagName("button")[0].click()}
list = document.querySelectorAll('[aria-labelledby="options-full-advertise_options"]')[0].getElementsByClassName("pill-184")
for (i=0; i< list.length; i++) { list[i].click()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment