javascript:document.body.appendChild(document.querySelector("#readme"));document.querySelector("header").remove();document.querySelector(".application-main").remove();document.querySelector("footer").remove();window.print();
Make it into a bookmarklet. It removes everything around the markdown article and opens the print dialog.
This has been extremely helpful 😄 . I'm surprised GitHub doesn't support this by default.
It may be better to use
document.querySelector(".markdown-body")
instead ofdocument.querySelector("#readme")
. This seems to make it work on Wiki pages as well.