diff options
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); |