Last active
May 31, 2023 22:05
-
-
Save edemaine/4507dc6a286a9428b86ae14a62a1f7ee to your computer and use it in GitHub Desktop.
Minimalize GitHub issue, suitable for referee responses
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
// Paste this into the console. | |
// Change https://github.com/settings/appearance to "Light high contrast" theme for better printing | |
document.querySelectorAll(` | |
#partial-discussion-header, | |
.js-header-wrapper, .hx_page-header-bg, | |
.gh-header-show, .gh-header-edit, .gh-header-meta, | |
.timeline-comment-header, | |
.TimelineItem-avatar, | |
.TimelineItem + div, | |
.comment-reactions, | |
.col-md-3, | |
.issue-comment-box, .discussion-timeline-actions, | |
#partial-discussion-sidebar, | |
.footer, | |
.handle, | |
#repository-container-header | |
`) | |
.forEach((dom) => dom.remove()) | |
// Erase speech caret on left | |
document.querySelectorAll('main > div') | |
.forEach((dom) => dom.className = '') | |
document.querySelectorAll('.timeline-comment--caret') | |
.forEach((dom) => dom.classList.remove('.timeline-comment--caret')) | |
// Remove border | |
document.querySelectorAll('.timeline-comment') | |
.forEach((dom) => dom.classList.remove('.timeline-comment')) | |
// Full width, no sidebar | |
document.querySelectorAll('.col-md-9') | |
.forEach((dom) => dom.classList.remove('col-md-9')) | |
document.querySelectorAll('.js-discussion') | |
.forEach((dom) => { | |
dom.classList.remove('ml-md-6') | |
dom.classList.remove('pl-md-3') | |
}) | |
document.querySelectorAll('.new-discussion-timeline') | |
.forEach((dom) => { | |
dom.classList.remove('px-3') | |
dom.classList.remove('px-md-4') | |
dom.classList.remove('px-lg-5') | |
dom.classList.remove('mt-4') | |
}) | |
// Remove vertical bar on bottom left | |
var style = document.createElement('style') | |
style.innerHTML = ` | |
.TimelineItem { padding: 0 } | |
.TimelineItem::before { width: 0 !important } | |
.Layout { --Layout-sidebar-width: 0 !important; --Layout-gutter: 0 !important } | |
` | |
document.body.appendChild(style) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment