-
-
Save isosphere/57bba75001c1614ac9a558403ec0200e to your computer and use it in GitHub Desktop.
Printable GitHub issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Printable GitHub issues | |
// @namespace https://github.com/gaute | |
// @include https://github.com/*/issues/* | |
// ==/UserScript== | |
if (typeof($) === "undefined") { | |
$ = unsafeWindow.$; | |
} | |
function main() { | |
var printcss = '#header, #footer, .instapaper_ignore, .subnav-bar, ' | |
+ '.context-loader, .actions, .error, ' | |
+ '.notification-settings, .ajax-error-message, form, .back, ' | |
+ '.js-comment-container, .avatar .overlay {display: none;}' | |
+ '.new-comments .js-comment-container {display: block;}' | |
+ '.new-comments {margin-left: 60px;}'; | |
var screencss = $('head link[media=screen]').attr('href'); | |
$('head').append('<link rel="stylesheet" media="print" href="' + screencss + '" type="text/css" />'); | |
$('head').append('<style media="print">' + printcss + '</style>'); | |
} | |
var script = document.createElement('script'); | |
script.textContent = '(' + main.toString() + ')();'; | |
document.body.appendChild(script); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Forked as it is now a dependency for my https://github.com/dataheck/maintenanace-issue-report and I don't want to lose it!