Awesome for security. In order for this to work, the server-side has to keep a record of every single URL posted to HN, to be able to do a lookup of the hash. It's crawling the "/newest" page [1] once a minute [2]. Not sure how he handles situations where the worker goes down (do those posts just not get indexed?).
I've just tried this one and it's great!
It's simple, unobtrusive and smart: a logo in the address bar indicates that the post is already on HN. If you click it you're taken to the comments page. Neat!
Update: I was a bit let down that you just show the HN page in an iframe, nd dont actually restyle the comments in a user friendly way like in a side bar for the site (which i think would be brilliant)
The thing is, I wanted to give the user complete HN commenting functionality, and have the comments look like regular HN comments too. So I figured that sourcing the actual comments page would be the best, since you get to use it just like you would if you visited HN directly.
I wonder how I earn a living doing what I do, and have never heard the word "bookmarklet". Reading the definition I know what they are, I've just never heard the term until now.
One nice thing about HN is that I can admit to such things because of the anonymity. It sure is an embarrassing feeling.
I saw the XML icons on websites for years before paying attention to what they meant (RSS feed) and what you could do with it (feedreaders, etc.)
We as a profession suck. It's not a criticism, just a statement of fact. We're in the stone ages. The interfaces my fellow programmers create are hard to discover, hard to understand, hard to use. And then I try to create interfaces and end up perpetrating the same crimes in my turn.
Nice. I'm often conflicted over whether to bookmark the actual page or the HN comments. Sometimes the comments are so valuable, I'll bookmark them instead, since I can always get to the page in question from the comments. This provides a nice alternative. Thanks.
I always just bookmark the comments, or a link to a particularly valuable comment, instead of the actual page for the same reasons.
I have a separate folder for the actual pages that I link with their corresponding HN bookmarks using Firefox's tagging feature. It makes it easy to find and load up both pages.
Added a fork, use it if you like, that checks to see if you are already on the Hacker News site, and if so, redirects you to the first page. Not sure why you would be checking it on Hacker News, but seemed like it should know that and response accordingly. Feel free to ignore or close the request if deemed useless.
Thanks, but that option doesn't appear. I can do that in Chrome, which gives me a URL for the a element, so I'm guessing the link is dynamically created (for whatever reason) and that's not playing nice on my install of Firefox.
It's only for matching links that are still in cache. Sometimes a link will come up that was also submitted months before, but it will show up as a separate submission instead of voting up the old one.
So HN already does this and it does it exactly the right way: if you submit something which already exists, it upvotes it instead of resubmitting it, which is exactly what you want.
If you want to submit a link (or upvote it) anyway, what is the added value of this bookmarklet?
The value is IMHO that you can access the comments of an existing entry within 2 clicks. Actually that's why I wrote this thing and how I use it personally. Found an interesting GitHub project? See what Hacker News says about it.
On the other hand, HN won't tell you it's a resubmit if the story isn't in memory (or in some cache? I'm not sure of the details) so it's still possible to submit a dupe. Submitting a link or searching on hnsearch.com is pretty cumbersome just to check if something's been submitted already.
Who wants to copy and paste a link into the submit page on hacker news, then get the message that it already exists when they can click this little bookmarklet.
https://chrome.google.com/webstore/detail/njdndkhkelkeepcnmo...