Skip to content

Instantly share code, notes, and snippets.

View bradcupit's full-sized avatar

Brad Cupit bradcupit

  • 00:05 (UTC -05:00)
View GitHub Profile
@bradcupit
bradcupit / expand all comments.js
Last active October 30, 2025 13:59
Bookmarklet to expand all "Show resolved" and "Show hidden" and "Load More" links in a GitHub PR conversation
javascript:(() => {
const DEFAULT_NUM_TRIES_AFTER_DONE = 5;
const MILLIS_TO_SLEEP = 500;
const MAX_ITERATIONS = 50;
const MAX_PARENTS_TO_CHECK = 7;
/* Originally taken from https://github.com/broadinstitute/gatk/wiki/Expand-outdated-Github-Comments */
function loadAll(numIterations, triesRemainingAfterDone) {
let showButtonArray = Array.from(document.getElementsByClassName('Details-content--closed')).filter(element => !parentIsOpen(element));
let loadMoreButtonArray = Array.from(document.getElementsByClassName('ajax-pagination-btn'));