←back to thread

1901 points l2silver | 6 comments | | HN request time: 0.789s | source | bottom

Maybe you've created your own AR program for wearables that shows the definition of a word when you highlight it IRL, or you've built a personal calendar app for your family to display on a monitor in the kitchen. Whatever it is, I'd love to hear it.
1. sir-g ◴[] No.35750370[source]
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

replies(2): >>35750403 #>>35751574 #
2. anjanb ◴[] No.35750403[source]
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.
replies(1): >>35759435 #
3. pxeger1 ◴[] No.35751574[source]
Are you aware that there's already a "next" link on every comment, that does exactly that? Or am I misunderstanding you?
replies(2): >>35755635 #>>35759412 #
4. l2dy ◴[] No.35755635[source]
The "next" link is not aligned across comments, so you have to move the mouse to click it consecutively.
5. sir-g ◴[] No.35759412[source]
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.
6. sir-g ◴[] No.35759435[source]
Here you go: https://github.com/seriypshick/js-bookmarks/blob/main/hn-nex...