Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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

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