Skip to content

Instantly share code, notes, and snippets.

@beane
Last active September 5, 2016 02:23
Show Gist options
  • Save beane/5a332c9b9b0d7239790e1f1ab76e3bc8 to your computer and use it in GitHub Desktop.
Save beane/5a332c9b9b0d7239790e1f1ab76e3bc8 to your computer and use it in GitHub Desktop.
Make reasonable margins for badly formatted text sites. Add this to your browser as a bookmarklet.
(function(){var body=document.getElementsByTagName('body')[0];body.style.margin="5% 20% 5% 20%";body.style.backgroundColor="#222222";body.style.color="#eeeeee";css='a{color:#0095dd}a:hover{color:#DD4800}';style=document.createElement('style');if(style.styleSheet){style.styleSheet.cssText=css;}else{style.appendChild(document.createTextNode(css));};document.getElementsByTagName('head')[0].appendChild(style);})();void(0);
@beane
Copy link
Author

beane commented Sep 5, 2016

Updated to look more like the "dark" theme from Firefox's Reader Mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment