Last active
December 30, 2015 21:40
-
-
Save flyingfisch/ce6789a1cd5d44373272 to your computer and use it in GitHub Desktop.
fixed disqus problem
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
// ==UserScript== | |
// @name easy-reading | |
// @namespace flyingfisch@toppagedesign.com | |
// @include * | |
// @version 1.22 | |
// @grant none | |
// ==/UserScript== | |
// to install, click the raw button in the upper right | |
var hasStyleSheets = false; | |
var inFrame = window.self !== window.top; | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
if (document.styleSheets[i].href != null) { | |
hasStyleSheets = true; | |
} | |
} | |
if (!hasStyleSheets && !inFrame) { | |
var el = document.getElementsByTagName("body")[0].style; | |
el.maxWidth = '40em'; | |
el.margin = '1em auto'; | |
el.fontFamily = '"Palatino Linotype","Book Antiqua",Palatino,serif'; | |
el.lineHeight = '1.7em'; | |
el.fontSize = '18px'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment