Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Greasemonkey script that adds collapse/expand links to HN comments
5 points by ilitirit on Aug 7, 2009 | hide | past | favorite
Here's a little script I hacked together to collapse/expand HN comments. My javascript and GM skills aren't the greatest so forgive the shoddy code.

I haven't really tested this thoroughly so there are probably a few (read: many) bugs but it seems to do an OK job. The "reply" link isn't currently hidden but it shouldn't be too hard to add include it.

I tested this on an offline page saved from HN, and when I tried it online there were slight differences between the HTML so it didn't work properly. This could be caused by FF extensions like AdBlock or stuff like that so chances are you might encounter problems as well.

Anyway, here's the script:

http://pastebin.com/f1e888ab6

Feel free to mod/crit/enhance.



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

Search: