Show HN: Submit to Hacker News | Browser Extension(hn.wbnns.com)
hn.wbnns.com
Show HN: Submit to Hacker News | Browser Extension
https://hn.wbnns.com/
7 comments
The HN API is not efficient - it says so itself in its readme. Which means neither is this. Making 1000+ HTTP requests to dupe check feels kind of insane when all you are doing is URL comparisons.
Why not instead make a single call to: https://news.ycombinator.com/from?site=whateverdomain.com, and parse that single result?
Why not instead make a single call to: https://news.ycombinator.com/from?site=whateverdomain.com, and parse that single result?
Thanks so much, I've just refactored to do exactly this, based on your comment: https://github.com/wbnns/submit-to-hacker-news/commit/1afd66...
Additional updates alongside the change: https://github.com/wbnns/submit-to-hacker-news/commit/d9e027...
There's a bookmarklet from Ycombinator, https://news.ycombinator.com/bookmarklet.html
Cheers, yes, this is inspired by it.
This extension is inspired by the 'post to HN' bookmarklet and does three main things...
1. Smart title optimization: automatically removes site names, converts "10 Ways to Build X" to "How to Build X", and follows HN's title guidelines / recommendations for best practices
2. Duplicate detection: scans 1000+ recent HN stories to find existing submissions (links to the most upvoted, canonical version if found)
3. Built-in HN guidelines: helps people like me who want to contribute, be mindful of doing it the right way
It's pure vanilla JavaScript with no external dependencies, uses HN's official Firebase API for duplicate checking, and only requests activeTab permission. Works on Chrome, Firefox, Edge, and Brave.
It's open source (MIT license) and privacy-first and the only data it accesses is your current tab's URL and title when you explicitly use it: https://github.com/wbnns/submit-to-hacker-news
You can install it by downloading from GitHub and loading the appropriate folder into your browser's developer mode. No accounts or setup required.