diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-03-31 19:08:06 -0700 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-03-31 19:08:06 -0700 |
commit | 347ae52e677887413b2e68d6e3d4217b92fc88ee (patch) | |
tree | cd00d02f33cf6a698762b30708f33a1209a3cecd /assets/javascript/app.js | |
parent | 5ff6896ee55e6bc735214e0df33d6e004372a03e (diff) | |
download | gitbook-347ae52e677887413b2e68d6e3d4217b92fc88ee.zip gitbook-347ae52e677887413b2e68d6e3d4217b92fc88ee.tar.gz gitbook-347ae52e677887413b2e68d6e3d4217b92fc88ee.tar.bz2 |
Fix star and watch count
Diffstat (limited to 'assets/javascript/app.js')
-rw-r--r-- | assets/javascript/app.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/assets/javascript/app.js b/assets/javascript/app.js index 55a711a..3f5d9b7 100644 --- a/assets/javascript/app.js +++ b/assets/javascript/app.js @@ -3,6 +3,7 @@ require([ ], function($){ $(document).ready(function() { var $book = $(".book"); + var githubId = $book.data("github"); // Toggle summary $book.find(".book-header .toggle-summary").click(function(e) { @@ -11,7 +12,7 @@ require([ }); // Star and watch count - $.getJSON("https://api.github.com/repos/{{ githubId }}") + $.getJSON("https://api.github.com/repos/"+githubId) .done(function(repo) { $book.find(".count-star span").text(repo.stargazers_count); $book.find(".count-watch span").text(repo.subscribers_count); |