Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…ce-editor into main
  • Loading branch information
Johnson070 committed Apr 21, 2021
2 parents 3948622 + 5e786b5 commit e9a80aa
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head></head>
<body>
</body>
<script>
fetch("https://api.github.com/repos/Johnson070/MiBand-5-watchface-editor/releases").then(
function(response){
return response.json()
}).then(function(data){
var p = data.map(function(x){
if(typeof x.assets == 'undefined' || x.assets.length == 0){ return 0; }
return x.assets[0].download_count;
});
var sum = 0;
for(var i=0;i<p.length;i++){
sum += p[i];
}
document.querySelector('body').innerHTML = `Total downloads: ${sum}`;
});
</script>
</html>

0 comments on commit e9a80aa

Please sign in to comment.