Last active
September 28, 2015 13:28
-
-
Save bennettmcelwee/1445631 to your computer and use it in GitHub Desktop.
User Script for formatting Less Wrong articles for printing
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 Less Wrong print formatter | |
// @version 1.0.1 | |
// @namespace http://thunderguy.com | |
// @description Remove cruft from LessWrong when printing | |
// @include http://lesswrong.com/* | |
// ==/UserScript== | |
// Add required GM APIs if they aren't present (they were broken in Chrome 27) | |
if ( ! GM_addStyle) { | |
function GM_addStyle(css) { | |
var style = document.createElement("style"); | |
style.textContent = css ; | |
document.head.appendChild(style); | |
} | |
} | |
GM_addStyle("\ | |
@media print { \ | |
#header { display: none; } \ | |
#nav { display: none; } \ | |
#sidebar { display: none; } \ | |
#content { width: auto; } \ | |
#wrapper { width: auto; } \ | |
} \ | |
"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment