Created
February 10, 2016 14:40
-
-
Save AndiH/a78a5d37fb80568340a3 to your computer and use it in GitHub Desktop.
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 Beautify danluu.com | |
// @namespace http://danluu.com/ | |
// @description Beautifies Dan Luu's website, because it's plain text | |
// @version 0.1 | |
// @include http://danluu.com/* | |
// @grant doCSS | |
// ==/UserScript== | |
var doCSS = function (){ | |
var css = 'body {font-family: "PT Serif", Georgia, Baskerville;max-width: 800px;margin: 0 auto;font-size: 1.1em;}h1, h2, h3, h4, h5 {font-family: "PT Sans";}blockquote {border-left: 2px dashed #D6D5D5;padding-left: 5px;}' | |
if (typeof GM_addStyle != "undefined") { | |
GM_addStyle(css); | |
} else if (typeof addStyle != "undefined") { | |
addStyle(css); | |
} else { | |
var heads = document.getElementsByTagName("head"); | |
if (heads.length > 0) { | |
var node = document.createElement("style"); | |
//node.type = "text/css"; | |
node.innerText = css; | |
heads[0].appendChild(node); | |
} | |
} | |
} | |
doCSS(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment