Last active
October 21, 2015 02:50
-
-
Save MattBlissett/8412ba5a66cb83fd093d to your computer and use it in GitHub Desktop.
Browser bookmarklet: reduce width of a page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var body = document.getElementsByTagName('body')[0];var style = body.style;var ss = [55,34,21,13,8];var sx = ('bodyMaxWidthIndex' in body) ? body.bodyMaxWidthIndex : 1;style.setProperty('max-width', ss[++sx % ss.length]+'cm', 'important');style.setProperty('line-height', '1.5');style.setProperty('margin-left', 'auto');style.setProperty('margin-right', 'auto');style.setProperty('font-family', 'sans-serif');body.bodyMaxWidthIndex = sx;})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Toggles between various maximum widths for the current web page, increases default line spacing slightly and makes the default font sans-serif.
Intended for browsing unstyled (or little-styled) web pages on wide-screen monitors.
Select the whole link and drag to your bookmark bar.
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication