https://github.com/igrigorik/hackernews-button
Embeddable Hacker News button + vote counter for your site
https://github.com/igrigorik/hackernews-button
Last synced: over 1 year 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 (about 14 years ago)
- Default Branch: master
- Last Pushed: 2019-01-10T04:05:59.000Z (over 7 years ago)
- Last Synced: 2025-03-30T18:08:46.664Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 171 KB
- Stars: 414
- Watchers: 12
- Forks: 25
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Embeddable Hacker News vote / counter button

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