Remove github count stars and watchers

This commit is contained in:
Samy Pessé
2014-07-30 10:43:10 -07:00
parent ba2134c480
commit b6af14b13e
3 changed files with 1 additions and 26 deletions
-20
View File
@@ -9,7 +9,6 @@ define([
"core/loading"
], function($, URL, events, state, progress, exercises, quiz, loading) {
var prev, next;
var githubCountStars, githubCountWatch;
var usePushState = (typeof history.pushState !== "undefined");
@@ -63,11 +62,6 @@ define([
}));
};
var updateGitHubCounts = function() {
$(".book-header .count-star span").text(githubCountStars);
$(".book-header .count-watch span").text(githubCountWatch);
};
var updateNavigationPosition = function() {
var bodyInnerWidth, pageWrapperWidth;
@@ -95,20 +89,6 @@ define([
// Focus on content
$pageWrapper.focus();
// Update GitHub count
if (state.githubId) {
if (githubCountStars) {
updateGitHubCounts();
} else {
$.getJSON("https://api.github.com/repos/"+state.githubId)
.done(function(repo) {
githubCountStars = repo.stargazers_count;
githubCountWatch = repo.subscribers_count;
updateGitHubCounts();
});
}
}
// Send to mixpanel
events.trigger("page.change");
};