Last active
October 3, 2023 12:09
-
-
Save JohnStarich/2aaee401387966f31d595260687106c8 to your computer and use it in GitHub Desktop.
Load all collapsed GitHub comments
This file contains hidden or 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
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('.pagination-loader-container button[type="submit"]'); | |
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