arnaucube
arnaucube/socialCountBadgePublic Self-hosted repository
socialCountBadge/README.md
README.mdRaw
 1# socialCountBadge
 2
 3## Install
 4```
 5bower install --save socialCountBadge
 6```
 7
 8Add to the index.html:
 9```html
10<link href="bower_components/socialCountBadge/socialCountBadge.css" rel="stylesheet">
11
12
13<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
14<script src="bower_components/socialCountBadge/socialCountBadge.js"></script>
15```
16
17Declare the badges variable:
18```html
19<script>
20var badges = {
21    hn: {
22        link: "https://news.ycombinator.com/item?id=16069200",
23        url:"https://hacker-news.firebaseio.com/v0/item/16069200.json",
24        callback: parseHN,
25        img: "img/hackernews.png",
26        count: null
27    },
28    reddit: {
29        link: "https://www.reddit.com/r/Python/comments/7o23lb/hacking_wifi_to_inject_cryptocurrency_miner_to/",
30        url:"https://www.reddit.com/r/Python/comments/7o23lb/hacking_wifi_to_inject_cryptocurrency_miner_to.json",
31        callback: parseReddit,
32        img: "img/reddit.png",
33        count: null
34    }
35};
36</script>
37```