5 ms·
I wrote a JS bookmark that lets me jump to the next top-level comment on HN. I use it for finding interesting conversions without having to scroll and look for
by sir-g 3y ago
I wrote a JS bookmark that lets me jump to the next top-level comment on HN. I use it for finding interesting conversions without having to scroll and look for the next top-level comment.
It works by finding all of the comments with indent=="0". Then, each time the bookmark is clicked, it creates and follows a link. Each comment has a unique id so I just have to concatenate current_url + "#" + unique_id and follow that link.
Once the script reaches the bottom, it follows the "more comments" link and repeats the same process.
I plan to write something similar for Reddit
- anjanb 3y agoHi, Can you share the same please ? I was planning on writing a browser extension that lists the top level comments for big threads like these.
- sir-g 3y agoHere you go: https://github.com/seriypshick/js-bookmarks/blob/main/hn-next-top-level-comment.js https://github.com/seriypshick/js-bookmarks/blob/main/hn-nex...
- pxeger1 3y agoAre you aware that there's already a "next" link on every comment, that does exactly that? Or am I misunderstanding you?