mirror of
https://github.com/ivabus/www
synced 2024-11-22 08:55:05 +03:00
Consolidated star/release repo scripts
This commit is contained in:
parent
1f2b3c038a
commit
b37f884423
2 changed files with 26 additions and 29 deletions
|
@ -134,29 +134,3 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
|||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var repository = "teaxyz/cli";
|
||||
var url = "https://api.github.com/repos/" + repository;
|
||||
|
||||
$.get(url, function(data) {
|
||||
var stargazers = numeral(data.stargazers_count).format("0.0a");
|
||||
$(".stargazers").html(stargazers).hide().fadeIn(400);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
var repository = "teaxyz/cli";
|
||||
var url = "https://api.github.com/repos/"+ repository +"/releases/latest";
|
||||
|
||||
$.get(url, function(data) {
|
||||
var release = data.tag_name;
|
||||
$(".release").html(release).hide().fadeIn(400);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -44,8 +44,6 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
|||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
const toastTrigger = document.getElementById('liveToastBtn')
|
||||
const toastLiveExample = document.getElementById('liveToast')
|
||||
if (toastTrigger) {
|
||||
|
@ -55,7 +53,6 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
|||
toast.show()
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
@ -108,3 +105,29 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
|||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var repository = "teaxyz/cli";
|
||||
var url = "https://api.github.com/repos/" + repository;
|
||||
|
||||
$.get(url, function(data) {
|
||||
var stargazers = numeral(data.stargazers_count).format("0.0a");
|
||||
$(".stargazers").html(stargazers).hide().fadeIn(400);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
var repository = "teaxyz/cli";
|
||||
var url = "https://api.github.com/repos/"+ repository +"/releases/latest";
|
||||
|
||||
$.get(url, function(data) {
|
||||
var release = data.tag_name;
|
||||
$(".release").html(release).hide().fadeIn(400);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue