EU citizen here. Whenever a site presents me with a tracking consent form that has >500 checkboxes to click in order to tell them to disable all tracking, I open up the dev console and do something like this:
Oh, hey. Looks like forEach has been added to the WebIDL spec for NodeList and other DOM iterables. Ain't that fancy. Time to go revise a whole bunch of code!
Or, if you're in Chrome, use $$(), which is a console method that returns the result of querySelectorAll() as an array instead of a nodelist! Very succinct and handy when futzing with the DOM in DevTools.
76
u/anlumo Mar 18 '19
EU citizen here. Whenever a site presents me with a tracking consent form that has >500 checkboxes to click in order to tell them to disable all tracking, I open up the dev console and do something like this:
document.querySelectorAll('.whateverClassTheCheckboxHas').forEach(cb => cb.click());