Hacker News new | past | comments | ask | show | jobs | submit login
Bookmarklet: Reddit-like Collapsible Threads for Hacker News (alexander.kirk.at)
81 points by akirk on Feb 16, 2010 | hide | past | favorite | 12 comments



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 :)


For your convenience, here is the source code: http://alexander.kirk.at/js/hackernews-collapsible-threads.j...

The bookmarklet first loads jQuery from the Google Ajax libraries, then that script. Both should be cached by the browser so that upon the next use of the bookmarklet it should not need to ask a server.


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.


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.


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.


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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: