Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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