#HN.js
HN.js is a small library that monitors to see if your site has hit the front page of Hacker News, and pops up a little apology notice if so :)
- Auto-detects for current page and homepage
- Uses the Hacker News API
<script src="//cdn.jsdelivr.net/hnjs/0.0.1/hn.js"></script>
<script>HNjs.initialize()</script>
Right now, there are no config settings. If the script detects that the current page or the '/' path of the current domain has been shared on HN, it will popup a little fixed position, dismissable DIV in the top right corner of the page.
- Clone the repo
- Install coffee:
npm install -g coffee-script
- Compile and watch hn.coffee:
coffee -w -c hn.coffee
Just fork and send a pull request!
This inspiration for this library came from poor Juliabox:
- Chrome
- Firefox
- Safari
- Chrome iOS
- Safari iOS
HN.js is licensed under MIT http://www.opensource.org/licenses/MIT
- Ribbon GIF came from http://www.quickribbon.com/
- Most of the Util code was lifted from some Ramen.js code
Copyright (c) 2014, Ramen, LLC
[email protected], @ramenapp