Skip to content

Instantly share code, notes, and snippets.

@kuanyui
Last active December 18, 2025 06:37
Show Gist options
  • Select an option

  • Save kuanyui/64a2e6f2b6b7b407fdf2dc6b003d320f to your computer and use it in GitHub Desktop.

Select an option

Save kuanyui/64a2e6f2b6b7b407fdf2dc6b003d320f to your computer and use it in GitHub Desktop.
Forked from https://meyerweb.com/eric/thoughts/2024/02/05/bookmarklet-load-all-github-comments/ , because its click event simulation doesn't work on Firefox
javascript:function run(){let btns=document.querySelectorAll("button");let loaders=[];for(const btn of btns){if(btn.textContent.trim().includes("Load more")){loaders.push(btn);btn.click()}}if(loaders.length>0){setTimeout(run,5e3)}}setTimeout(run,500);void"return undefined here";
javascript:
function run() {
let btns = document.querySelectorAll('button');
let loaders = [];
for (const btn of btns) {
if (btn.textContent.trim().includes('Load more')) {
loaders.push(btn);
btn.click();
}
}
if (loaders.length > 0) {
setTimeout(run, 5000);
}
}
setTimeout(run, 500);
void "return undefined here";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment