Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/igrigorik/hackernews-button
Embeddable Hacker News button + vote counter for your site
https://github.com/igrigorik/hackernews-button
Last synced: 4 days ago
JSON representation
Embeddable Hacker News button + vote counter for your site
- Host: GitHub
- URL: https://github.com/igrigorik/hackernews-button
- Owner: igrigorik
- Created: 2012-04-15T16:18:24.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2019-01-10T04:05:59.000Z (about 6 years ago)
- Last Synced: 2024-12-30T23:17:36.653Z (11 days ago)
- Language: Go
- Homepage:
- Size: 171 KB
- Stars: 413
- Watchers: 13
- Forks: 25
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Embeddable Hacker News vote / counter button
![HN Button](http://img.skitch.com/20120415-bp8igiq74w53f91swt6tcy9cx8.jpg)
Async, embeddable submit + vote counter button for Hacker News.
- If the story has not been posted to HN, "Submit" button is shown, otherwise latest point count is displayed.
- Auto-detects Google Analytics and registers clicks events (see reports under `Traffic Sources > Social > Social Plugins`).### Embedding the button
**Step 1**, place the HN link where you want the button appear on the page:
```html
Vote on HN
```**Step 2**, include the (async) javascript file:
```html
```
_Note: you can safely embed multiple buttons on the same page._
### Misc
* Kudos to @sbashyal and @stbullard for the button styling (hnlike.com)
* Kudos to Algolia for an [awesome HN API](http://hn.algolia.com/)
* (MIT License) - Copyright (c) 2012 Ilya Grigorik