Skip to content

Instantly share code, notes, and snippets.

@andresh3
Last active November 3, 2023 02:43
Show Gist options
  • Save andresh3/63446c7ce7e65eed0f216888e66ce79f to your computer and use it in GitHub Desktop.
Save andresh3/63446c7ce7e65eed0f216888e66ce79f to your computer and use it in GitHub Desktop.

This version leaves some of the header and border-lines.

javascript:(function(){document.getElementsByClassName('pagehead')[0].remove();document.getElementsByClassName('js-header-wrapper')[0].remove();})();

These bookmarklet's strip down github gist pages so that the content is easily printable. (Both versions published 10/23/23, feel free to redist as you please). They're not perfect and only work for markdown or other gist pages w/ no horizontal scrolling content and will only do one file and not multiple.

This version completely strips the page.

javascript:(function(){var n=document.getElementsByClassName('Box-body')[0].cloneNode(true);document.body.children[0].remove();document.body.appendChild(node);node.style.borderBottom = 'none';})();```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment