News for hackers. Stuff that matters.
Re:Ask HN: Most interesting tech you built for just yourself? by sir-g on Saturday April 29, 2023 @01:43AM (#35750370)
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

Re:Ask HN: Most interesting tech you built for just yourself? by anjanb on Saturday April 29, 2023 @01:52AM (#35750403)
Hi, 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.
Re:Ask HN: Most interesting tech you built for just yourself? by sir-g on Saturday April 29, 2023 @11:24PM (#35759435)
Re:Ask HN: Most interesting tech you built for just yourself? by pxeger1 on Saturday April 29, 2023 @06:06AM (#35751574)
Are you aware that there's already a "next" link on every comment, that does exactly that? Or am I misunderstanding you?
Re:Ask HN: Most interesting tech you built for just yourself? by l2dy on Saturday April 29, 2023 @02:25PM (#35755635)
The "next" link is not aligned across comments, so you have to move the mouse to click it consecutively.
Re:Ask HN: Most interesting tech you built for just yourself? by sir-g on Saturday April 29, 2023 @11:19PM (#35759412)
No, I didn't realize there's already a feature like that. But as the other commenter said, it jumps around, so, I still prefer my solution.