Skip to content

Instantly share code, notes, and snippets.

@edemaine
Last active October 20, 2025 14:31
Show Gist options
  • Select an option

  • Save edemaine/4507dc6a286a9428b86ae14a62a1f7ee to your computer and use it in GitHub Desktop.

Select an option

Save edemaine/4507dc6a286a9428b86ae14a62a1f7ee to your computer and use it in GitHub Desktop.
Minimalize GitHub issue, suitable for referee responses
// Paste this into the console.
// Change https://github.com/settings/appearance or https://github.mit.edu/settings/appearance
// to "Light default" theme for better printing
// Use https://chromewebstore.google.com/detail/webtex-%E2%80%93-render-latex-any/cbcpbegaepelbhjfkikhbhhoemegdbim
// to render LaTeX math mode in $...$
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