3 ms·
HN Comments Inline
- hilodoro 2y agoI 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 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 https://github.com/philrhc/hn-inline
- walterbell 2y ago> The comments are then retrieved from the Algolia API Could comments be retrieved from the HN page?
- hilodoro 2y agothis 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
- aurbano 2y agoThis 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