mirror of
https://github.com/ivabus/www
synced 2024-11-22 08:05:10 +03:00
Amend scripts to include personal access token
This commit is contained in:
parent
310c88303a
commit
28981534d5
1 changed files with 27 additions and 15 deletions
|
@ -143,25 +143,37 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
|||
$(document).ready(function() {
|
||||
var repository = "teaxyz/cli";
|
||||
var url = "https://api.github.com/repos/" + repository;
|
||||
var token = "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";
|
||||
|
||||
$.get(url, function(data) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
headers: {
|
||||
"Authorization": "token " + token
|
||||
},
|
||||
success: function(data) {
|
||||
var stargazers = "(" + numeral(data.stargazers_count).format("0.0a") + ")";
|
||||
$(".stargazers").html(stargazers).hide().fadeIn(400);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var repository = "teaxyz/cli";
|
||||
var url = "https://api.github.com/repos/"+ repository +"/releases/latest";
|
||||
var token = "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";
|
||||
|
||||
$.get(url, function(data) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
headers: {
|
||||
"Authorization": "token " + token
|
||||
},
|
||||
success: function(data) {
|
||||
var release = data.tag_name;
|
||||
$(".release").html(release).hide().fadeIn(400);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue