5 ms·
I wrote a chrome extension that went the opposite direction: hit the extension button and you would get a list of hacker news and reddit submissions for that UR
by rtpg 7y ago
I wrote a chrome extension that went the opposite direction: hit the extension button and you would get a list of hacker news and reddit submissions for that URL. Was super useful for finding some cool comments on a page
I’ve since moved to Firefox and gave up on the extension, but it might be an easy port...
- air7 7y agoFirefox extensions are nowadays (since Quantum) web-extensions and are almost identical to chrome's so porting should be quite simple.
- syx 7y agoyou just described exactly what I've done a year ago [1] I always promised myself to rewrite it for Firefox but was too lazy. [1] https://github.com/syxanash/commentdat https://github.com/syxanash/commentdat
- tetizera 7y agoI'd love to have this extension! Let us know if you ever pick up that extension. I do have one question though. Links on e-mails usually have "?utm_campaign=id_campaign&utm_source=nytimes" for example. Is it possible to avoid duplicates? To this day this is one of the major headaches for mods on Reddit. There's also the mobile links for the same news article.
- syx 7y agoThis was more of a kludge than a serious project, but glad I was not the only one to find this useful, will definitley continue working on it. >Is it possible to avoid duplicates? I thought about this as well in the past but never actually found a solution. Maybe someone here knows if there's research or an algorithm to uniquely identify the URL. Edit: typos
- weaksauce 7y agoStripping out the query string probably works for 80%(maybe even more) of the sites. Maybe that by default and then an option to search for the whole url as a fallback?
- 333c 7y agoSome pages will link to a canonical URL in the head: https://en.wikipedia.org/wiki/Canonical_link_element https://en.wikipedia.org/wiki/Canonical_link_element
- the_duke 7y agoFYI: converting a Chrome to a FF extension is easy to do now. They are mostly the same, and Firefox has a compatibility library that stubs most of the incompatibilities.
- comntr 7y agoYep, I didn't have to do much other then doing if(chrome.contextMenus){...} to make this extension run on Firefox and Firefox Android. But I intentionally chose the <iframe> approach to minimise the browser-dependent surface, so the <iframe> draws the UI and the extension only makes a few basic things like updating the icon color.
- gitgud 7y agoSame as the [1] extension I wrote last year. Firefox was easier to incorporate than I thought though, the API is almost identical. [1] https://newsit.benwinding.com/ https://newsit.benwinding.com/
- MetallicKat 7y agoThis is nice. Exactly what I am looking for!
- ekzy 7y agoI wrote a similar extension too! Looks like we all had the same idea https://chrome.google.com/webstore/detail/hacker-news-lookup/ekfmfhhfalhmiacchemmhapffjaolffo https://chrome.google.com/webstore/detail/hacker-news-lookup...
- Jaruzel 7y agoYou might be able to do with just a bookmarklet into the algolia search for HN. EDIT: I've just created a proof of concept that works: http://www.jaruzel.com/apps/hnlookup/ http://www.jaruzel.com/apps/hnlookup/
- deleted 7y ago[deleted]
- comntr 7y agoSo it effectively runs arbitrary javascript in the current page? I mean, if I run it on my online banking page, it'll have access to everything. The extension isn't ideal either - access to the current URL is too much - but at least it can't run arbitrary JS in the page itself.
- Jaruzel 7y agoIf you look at the bookmarklet, you'll see that the JS in it only fetches the URL and appends it to an Algolia search query. Nothing is sent to any other server. It's all done in your browser. Hacker News has exactly the same type of bookmarklet on their 'bookmarklet' link at the bottom of every page[1]. Arguably this method is safer than an Extension. --- [1] https://news.ycombinator.com/bookmarklet.html https://news.ycombinator.com/bookmarklet.html