Skip to content

Instantly share code, notes, and snippets.

@iznenad
Created November 14, 2017 16:44
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 iznenad/5156af962c3dd728d8186f7f080a027d to your computer and use it in GitHub Desktop.
Save iznenad/5156af962c3dd728d8186f7f080a027d to your computer and use it in GitHub Desktop.
prepare_for_print
javascript:(function () {var title = document.getElementsByClassName('gh-header-title instapaper_title')[0];var body = document.getElementsByClassName('markdown-body')[0];var newDiv = document.createElement('div');newDiv.className = "container";newDiv.appendChild(title);newDiv.appendChild(body);document.getElementsByTagName('body')[0].innerText = '';document.getElementsByTagName('body')[0].appendChild(newDiv);})()
@jeramadon
Copy link

example:

https://github.com/ebf/EBFWiki/wiki/MIDA-installation-Guide

click it while on a page

it just removes the header, links etc

after that you click cmd + P and export to pdf as usual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment