Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
HN Comments Inline (github.com/philrhc)
5 points by hilodoro 10 months ago | hide | past | favorite | 4 comments


I like the interleaved posting style, that maybe it leads to more focused responses and the response has more context. I was inspired by this to create a little prototype that highlights HN comments that quote the article using '>' and then displays the comment alongside it. It’s quite fun because these types of quote comments are fairly common.

It triggers when a user clicks on an article on news.ycombinator.com, (identified with the query .titleline a:not(.sitebit.comhead a) ) it then queries the Algolia API for the comments for the submission ID and then injects a script onto the page when it’s complete to find and highlight the quotes.

here are some screenshots of it in action: https://imgur.com/a/jqK0GL6

it’s quite basic and i find the permissions to do this quite extreme so i am hesitant to share it on the browser extension marketplaces, but the code is below for anyone interested to try it out:

https://github.com/philrhc/hn-inline


> The comments are then retrieved from the Algolia API

Could comments be retrieved from the HN page?


this is a good idea, the api query also works when navigating to an article from the HN front page, when the comments are not on the page


This is awesome! It makes reading the articles a lot more engaging as I can directly see comments without the back and forth :)

I might start reading the actual submissions more often instead of just the comments




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

Search: