1
0
mirror of https://github.com/bigchaindb/site.git synced 2024-11-02 08:21:58 +01:00
site/_src/_assets/javascripts/bigchain/github.js
Matthias Kretschmann afb4428448 Hero community bar (#117)
* new hero community bar
* fix hero smooth scroll
2017-05-04 14:27:12 +02:00

22 lines
627 B
JavaScript

(function() {
var s = document.createElement('script'),
githubApiUrl = 'https://api.github.com/repos/',
owner = 'bigchaindb',
repo = 'bigchaindb';
s.type = 'text/javascript';
s.async = true;
s.src = githubApiUrl + owner + '/' + repo + '?callback=' + owner + '.getGitHubRepoInfo';
window[owner] = window[owner] || {};
window[owner].getGitHubRepoInfo = function(response) {
var stargazers = response.data.stargazers_count;
document.getElementById('stargazers').innerText = stargazers;
};
document.getElementsByTagName('HEAD')[0].appendChild(s);
}());