3 ms·
Here's my bookmarklet that turns all text black. javascript:(function(){var%20i,x;for(i=0;x=document.getElementsByTagName("*")[i];++i)x.style.color="#00000
by retSava 4y ago
Here's my bookmarklet that turns all text black.
javascript:(function(){var%20i,x;for(i=0;x=document.getElementsByTagName("*")[i];++i)x.style.color="#000000";})();
- BeefWellington 4y agoIdentical functionality, different way to skin the cat: javascript:document.querySelectorAll("*").forEach((x)=>{x.style.color="#000"})
- johnday 4y agoThis will be significantly faster, since it only queries the DOM once, rather than O(n) times.
- retSava 4y agoI don't recall seeing this taking any more time than being instantaneous so that in itself wouldn't be a UX problem, but I also do like when things are not unnecessarily wasteful, so grateful for that cleaner approach :). Tbh, I dislike web programming and anything close to DOM, I'm more of a backend and embedded kind of guy. I haven't had success in making a similar one that removes "overflow: hidden" from all elements. That in combo with removing anything with fixed position is a quick and dirty way of bypassing GDPR pop-ups. Say you come to a new site, eg via a HN link. Boom, I have to indicate my stance towards tracking and ads by rejecting all cookies, and objecting to "legitimate" interests. That takes time, so instead I have a bookmarklet that removes anything with position:fixed (the gdpr pop-up). The second piece would be re-enabling scroll by disabling the "overflow: hidden". I do this manually now by inspecting.
- johnday 4y agoI do something similar! Can highly recommend greasemonkey for automating the process. Once it's in place it makes the web so much nicer.