

Show HN: Hackertalk – CLI tool that finds Hacker News discussion for any URL - lunarcave
https://github.com/ncthis/hackertalk

======
sourabh86
THIS my friend.Awesome! I was planning to create something like since a long
time. Thanks!

------
benbristow
Nice little tool. Very clean source code too; might have to look into NodeJS
myself.

~~~
lunarcave
Thank you. I've tried to keep the functionality minimal in order keep the
source clean with just one file.

------
rane
Is there a Chrome extension or a bookmarklet that does this?

~~~
lunarcave
Not yet. But it's a trivial operation to port the Node.js source to front-end.

Edit: here's the bookmarklet code.

    
    
      javascript:(function(){var r=new XMLHttpRequest;r.open("GET","https://hn.algolia.com/api/v1/search?query="+encodeURIComponent(location.href),true);r.onreadystatechange=function(){if(r.readyState==4&&r.status==200){var e=JSON.parse(r.responseText);if(e.nbHits>0){location.href="https://news.ycombinator.com/item?id="+e.hits[0].objectID}else{alert("this url has not been submitted yet")}}};r.send()})()

