Zap Colors
This is the “Zap Colors” bookmarklet I've been using for decades. I wanted to mention it on mastodon, but trying to paste javascript there is... fraught.
Apologies for the formatting. The bookmarklet needs things quoted and such so it survives in my bookmarks file without getting mangled, and it's easier to just keep that than to try and reformat this. Though perhaps on another day, I'll make the effort.
javascript:(function()%7Bvar%20newSS,%20styles='*%20%7B%20background:%20white%20!%20important;%20color:%20black%20!important%20%7D%20:link,%20:link%20*%20%7B%20color:%20%230000EE%20!important%20%7D%20:visited,%20:visited%20*%20%7B%20color:%20%23551A8B%20!important%20%7D';%20if(document.createStyleSheet)%20%7B%20document.createStyleSheet(%22javascript:'%22+styles+%22'%22);%20%7D%20else%20%7B%20newSS=document.createElement('link');%20newSS.rel='stylesheet';%20newSS.href='data:text/css,'+escape(styles);%20document.getElementsByTagName(%22head%22)%5B0%5D.appendChild(newSS);%20%7D%20%7D)();
Discuss... Reply to this in the fediverse: @davepolaschek@writing.exchange