Hacker News new | ask | show | jobs
by greyface- 1053 days ago
I use and recommend the same approach, and add the following trick: some sites will use CSS to hide content until JS runs and twiddles some attribute to un-hide everything. For those sites, disabling CSS will often make the content readable without the need to enable JS. This bookmarklet disables CSS:

  javascript:(function(){ var i,x;for(i=0;x=document.styleSheets[i];++i)x.disabled=true;})();
4 comments

Hey I just wanted to say this thing is so handy I created an account to thank you. 10/10 lifehack.
Or, in Firefox’s menu bar, simply click “View” → ”Page Style” → “No Style”.
Yes! I forgot to mention, but this is one of the tools I use to check if the CSS is breaking the site.
This doesn't work for anything that runs a `<div id="root" style="display:none">` style hider, and in most cases it messes up the layout completely because it renders all images without explicit height/width attribute at full native resolution.
Great point about inline styles. I've added a bit that removes them anywhere they're present:

  javascript:(function(){document.querySelectorAll("[style]").forEach(function(x){x.style=""});var i,x;for(i=0;x=document.styleSheets[i];++i)x.disabled=true;})();
I would give you two upvotes if I could.