Skip to content

Instantly share code, notes, and snippets.

@bennettmcelwee
Last active September 28, 2015 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennettmcelwee/1445631 to your computer and use it in GitHub Desktop.
Save bennettmcelwee/1445631 to your computer and use it in GitHub Desktop.
User Script for formatting Less Wrong articles for printing
// ==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