You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1011 B

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