Flat HN

November 23, 2014

Flat HN is a bookmarklet that hides threaded conversations on Hacker News.

How to use

Drag this link, Flat/Threaded HN, to your bookmarks. Open a discussion on HN and click on the newly created "Flat/Threaded HN" bookmark to hide nested comments. Clicking on the bookmarklet again will revert the page back to the threaded view.

Demonstrating Flat HN

Why Flat HN?

Threaded conversations in Hacker News (HN) can be a pain at times. It's easy to lose context as you scroll down a long discussion; see the screenshot below. Jeff Atwood has written at length about the issues with threaded discussions and suggests limiting the level of replies allowed.

Threaded Conversations in HN

How does it work?

HN's html suggests hiding deeply threaded comments should be simple. A spacer GIF appears to be used to indent comments, and those spacers used for indentation seem to have width in multiples of 40 in proportion to the depth of the comment. The idea is to have some javascript as a bookmark, and this script gets executed in the context of the page that is open when you click on the bookmarklet.

How Flat HN works