Skip to content

Instantly share code, notes, and snippets.

@JohnStarich
Last active July 8, 2026 20:06
Show Gist options
  • Select an option

  • Save JohnStarich/2aaee401387966f31d595260687106c8 to your computer and use it in GitHub Desktop.

Select an option

Save JohnStarich/2aaee401387966f31d595260687106c8 to your computer and use it in GitHub Desktop.
Load all collapsed GitHub comments
javascript:(function() {
/*
To use this bookmarklet, create a new bookmark in your browser and paste
the entire contents of this file into the URL address box.
*/
let emptyMillis = 0;
const delayMillis = 250;
const interval = setInterval(() => {
const elems = document.querySelectorAll('button[data-testid="issue-timeline-load-more-load-top"], button[data-testid="issue-timeline-load-more-load-bottom"]');
if (elems.length === 0) {
emptyMillis += delayMillis;
} else {
emptyMillis = 0;
elems[0].scrollIntoView({ behavior: 'smooth' }); /* This helps us see progress. 'instant' resulted in forward and backward jumps, which was weird. */
}
elems.forEach(e => e.click());
if (emptyMillis > 5000) {
clearInterval(interval);
}
}, delayMillis);
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment