Created
November 29, 2013 19:57
-
-
Save Dispader/7711117 to your computer and use it in GitHub Desktop.
a quick bookmarklet to modify main page styles for readability
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 newSS, styles = '* { background: black ! important; color: white !important } :link, :link * { color: #AAAAFF !important } :visited, :visited * { color: #9191FF !important }'; | |
if (document.createStyleSheet) { | |
document.createStyleSheet("javascript:'" + styles + "'"); | |
} else { | |
newSS = document.createElement('link'); | |
newSS.rel = 'stylesheet'; | |
newSS.href = 'data:text/css,' + escape(styles); | |
document.getElementsByTagName("head")[0].appendChild(newSS); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment