Bookmarklet: Load All GitHub Comments (take 2)

In which I update a bookmarklet to load all the comments on super-long GitHub threads.


This content originally appeared on Thoughts From Eric and was authored by Eric Meyer

What happened was, I wrote a bookmarklet in early 2024 that would load all of the comments on a lengthy GitHub issue by auto-clicking any “Load more” buttons in the page, and at some point between then and now GitHub changed their markup in a way that broke it, so I wrote a new one.  Here it is:

GitHub issue loader (20250913)

It totals 258 characters of JavaScript, including the ISO-8601-style void marker, which is smaller than the old version.  The old one looked for buttons, checked the .textContent of every single one to find any that said “Load more”, and dispatched a click to each of those.  Then it would do that again until it couldn’t find any more such buttons.  That worked great until GitHub’s markup got changed so that every button has at least three nested <div>s and <span>s inside itself, so now the button elements have no text content of their own.  Why?  Who knows.  Probably something Copilot or Grok suggested.

So, for the new one provided above: when you invoke the bookmarklet, it waits half a second to look for an element on the page with a class value that starts with LoadMore-module__buttonChildrenWrapper.  It then dispatches a bubbling click event to that element, waits two seconds, and then repeats the process.  Once it repeats the process and finds no such elements, it terminates.

I still wish this capability was just provided by GitHub, and maybe if I keep writing about it I’ll manage to slip the idea into the training set of whatever vibe-coding resource hog they decide to add next.  In the meantime, just drag the link above into your toolbar or otherwise bookmark it, use, and enjoy!

(And if they break it again, feel free to ping me by commenting here.)


    Have something to say to all that? You can add a comment to the post, or email Eric directly.


    This content originally appeared on Thoughts From Eric and was authored by Eric Meyer


    Print Share Comment Cite Upload Translate Updates
    APA

    Eric Meyer | Sciencx (2025-09-14T13:48:27+00:00) Bookmarklet: Load All GitHub Comments (take 2). Retrieved from https://www.scien.cx/2025/09/14/bookmarklet-load-all-github-comments-take-2/

    MLA
    " » Bookmarklet: Load All GitHub Comments (take 2)." Eric Meyer | Sciencx - Sunday September 14, 2025, https://www.scien.cx/2025/09/14/bookmarklet-load-all-github-comments-take-2/
    HARVARD
    Eric Meyer | Sciencx Sunday September 14, 2025 » Bookmarklet: Load All GitHub Comments (take 2)., viewed ,<https://www.scien.cx/2025/09/14/bookmarklet-load-all-github-comments-take-2/>
    VANCOUVER
    Eric Meyer | Sciencx - » Bookmarklet: Load All GitHub Comments (take 2). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/09/14/bookmarklet-load-all-github-comments-take-2/
    CHICAGO
    " » Bookmarklet: Load All GitHub Comments (take 2)." Eric Meyer | Sciencx - Accessed . https://www.scien.cx/2025/09/14/bookmarklet-load-all-github-comments-take-2/
    IEEE
    " » Bookmarklet: Load All GitHub Comments (take 2)." Eric Meyer | Sciencx [Online]. Available: https://www.scien.cx/2025/09/14/bookmarklet-load-all-github-comments-take-2/. [Accessed: ]
    rf:citation
    » Bookmarklet: Load All GitHub Comments (take 2) | Eric Meyer | Sciencx | https://www.scien.cx/2025/09/14/bookmarklet-load-all-github-comments-take-2/ |

    Please log in to upload a file.




    There are no updates yet.
    Click the Upload button above to add an update.

    You must be logged in to translate posts. Please log in or register.