2 ms·
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
by hilodoro 2y ago
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 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