Skip to content

Instantly share code, notes, and snippets.

@reorx
Last active December 11, 2015 08:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reorx/9ae92afe56f7989dcd48 to your computer and use it in GitHub Desktop.
Save reorx/9ae92afe56f7989dcd48 to your computer and use it in GitHub Desktop.
Bookmark to make gist more printable (tested for markdown file only)
javascript:void(
(function(w, d, j) {
// Header
j('.header.gist-header').remove();
j('.gist-detail-intro.gist-banner').remove();
// Main Head
j('.pagehead.repohead').remove();
// Main Container
j('.repository-meta').remove();
j('.file-header').remove()
// Discussion
j('.discussion-timeline').remove();
// Footer
j('.site-footer').parent().remove();
// Adjust Style
j('.container').css({
'width': '100%'
});
j('.file').css({
'margin-top': 0,
'margin-bottom': 0,
'border': 'none'
});
}) (window, document, jQuery));
// Compress using: http://jscompress.com/
// Bookmark:
// javascript:void function(e,o,r){r(".header.gist-header").remove(),r(".pagehead.repohead").remove(),r(".repository-meta").remove(),r(".file-header").remove(),r(".discussion-timeline").remove(),r(".site-footer").parent().remove(),r(".container").css({width:"900px"}),r(".file").css({"margin-top":0,"margin-bottom":0,border:"none"})}(window,document,jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment