Created
February 12, 2023 16:54
-
-
Save tbremer/3fd3be98073955ff8b6d51e140a44e7c to your computer and use it in GitHub Desktop.
Github Markdown Print
This file contains 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
(() => { | |
document.body.appendChild(document.querySelector(".markdown-body")); | |
document.querySelector("div.page-responsive")?.remove(); | |
(Array.from(document.querySelectorAll('div')) ?? []).forEach(e => { if (e.textContent === '') e.style = 'page-break-after: always;' }) | |
window.print(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment