5 ms·
Bookmarklet: Reddit-like Collapsible Threads for Hacker News
- pieter 17y agoIt's a bit buggy if you collaps a child before collapsing the parent, and then expand the parent again
- akirk 17y agoIt 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 :)
- akirk 17y agoFor your convenience, here is the source code: http://alexander.kirk.at/js/hackernews-collapsible-threads.js 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.
- ilitirit 17y agoI'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.
- johnfn 17y agoJust 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.
- akirk 17y agoI 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.
- Groxx 17y agoVery 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.
- akirk 17y agoWell, maybe we can get Paul to integrate it into Hacker News :)
- chasingsparks 17y agoOr 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.
- qeorge 17y agoThanks for making this, collapsing comments is one of reddit's best features.