12 comments

[ 0.27 ms ] story [ 38.0 ms ] thread
It always happens to me that I get lost in long threads on Hacker News that get started from the highest-ranking comment.

In order to be able to easily view the second-ranking (top-level) comment I wrote a small bookmarklet to achieve just that. Enjoy :)

It's a bit buggy if you collaps a child before collapsing the parent, and then expand the parent again
I know, see the "PS" in the blog post. For now, I think it's probably not worth the trouble fixing that.
That bug is now fixed, too.
I've written a greasemonkey script that does the same thing. Unfortunately the test page I used didn't have things like downvoted comments and a few edge cases that caused it to fail. It would be much easier if comments were given a unique class name or id.
Just a little note: I read hacker news from hackerne.ws, and you currently have it domain restricted to news.ycombinator.com. Not a big deal, but why not just remove the domain restriction? Seems like more trouble than it's worth.

Other than that, fantastic. I can't believe you made this - I was honestly thinking to myself earlier today that HN needed a collapse comment link.

I saw in the server referrers that people were trying it on other pages where it has no effect, or might have strange effects, so I think it's good to have it there to be sure people understand where it's to be used :)

I have added the hackerne.ws domain to the check and also added a no-domain check bookmarklet to the blog post.

Very nice. Though it apparently needs a bit of polishing, this is something I'd love to have on the site, rather than having to use bookmarklets.

Maybe Firefox & Chrome quick plugins to do this automatically? The dev channel for OSX-Chrome finally accepts plugins.

Well, maybe we can get Paul to integrate it into Hacker News :)
Or make a GreeseMonkey script.

I've mean meaning to write one that highlights people I respect and rewrites the comment tree according to my own ideas.

Thanks for making this, collapsing comments is one of reddit's best features.