Show HN: HNRelevant – Show related HN submissions in an integrated sidebar (github.com)
While browsing Hacker News, I wished for an easier way to find related submissions (instead of googling and going back and forth). So I made this small chrome extension that automatically shows relevant submissions on page load. It's intergrated as a sidebar right in the page (for ease & native look), with customization options for fine control.
It's based on HN algolia search API[1] and uses the submission title as its initial query with the ability to customize the query if you're not satisfied with the initial results.
Originally, I took it as an opportunity to try my hands at creating a browser extension, but I was quite satisfied with the result and so I decided to release it.
[1] HN algolia search API: https://hn.algolia.com/api
37 comments
[ 3.3 ms ] story [ 76.3 ms ] threadthanks for sharing
It probably doesn't need much tweaking to work on other browsers. Will definitely look into it.
it's not necessarily true the other way around, though, because there are some weird things that google chooses not to support (e.g. promises, they require that you use callbacks instead)
Sending a full history somewhere (in this case hn search) doesn't seem like a great idea
Since I would like it to be more auto-pilot, will probably introduce an option to opt for 'manual' mode for those interested
As for the extension, it doesn't depend on anything other than hackernews and the search api, so a port should be easy.
Update: It's now available as a userscript, tested on Firefox with Tampermonkey
That said, from the two (the other one being Safari), Firefox is much easier to port the extension to and there's even webextension-polyfill that gets you >95% of the way there (most of the time).
Is it? Has anyone in this thread tried this? (I have not.) https://developer.apple.com/documentation/safariservices/saf...
To be more precise the last time I did this I had to: - Adjust cookie SameSite attribute (cookies didn't work properly otherwise) - Migrate back from MV3 to MV2 (Safari DevTools are really bad for MV3 for some reason and there were also other issues that didn't appear in MV2) - Adjust JS and CSS (some newer techniques were simply not supported in Safari)
Firefox didn't have any of those issues. On top of that, there's much more resources available online than there is for Safari - though, to be fair, it's mostly because its support for WebExtensions is newer and there aren't as many extensions for Safari. But, when you do find some resources you have to verify whether they're actually on the most recent standard - Web Extensions - since Safari supported multiple over the years, that have nothing to do with WE, and are very similarly named: Safari Extensions, Safari App Extensions, Safari Web Extensions
https://developer.apple.com/documentation/safariservices/saf...
Is there a way to shrink the sidebar font wrt to the main content font; similar to Chrome Reading List sidebar? I don't see any mechanism in the code to do that. ATM it's (naturally) the same size as the rest of the page which gives the sidebar the same "importance" as the main content.
I'm thinking something simple, like dropping in a CSS snippet, as opposed to a whole framework of different CSS stanzas _a la_ Obsidian.
I tested it on Firefox with Tampermonkey, but I'll admit that I'm not that familiar with userscripts extensions, so if you try it, let me know what you think
1. Chrome web store: https://chrome.google.com/webstore/detail/hnrelevant/iajhnke...
2. Firefox add-ons: https://addons.mozilla.org/en-US/firefox/addon/hnrelevant/
Don't forget to leave reviews if you find it useful