Fixed #1: GitHub stars don't work if the repo_url ends with a '/'

This commit is contained in:
squidfunk
2016-02-10 14:09:30 +01:00
parent d67bfc0375
commit ee05f7d870
10 changed files with 28 additions and 15 deletions

View File

@@ -508,9 +508,9 @@ document.addEventListener('DOMContentLoaded', function() {
function(data, xhr) {
var count = data.stargazers_count;
if (count > 10000)
count = (count / 1000).toFixed(0) + "k";
count = (count / 1000).toFixed(0) + 'k';
else if (count > 1000)
count = (count / 1000).toFixed(1) + "k";
count = (count / 1000).toFixed(1) + 'k';
/* Set number of stars */
var stars = document.querySelector('.repo-stars .count');