Amend scripts to include personal access token

This commit is contained in:
Thomas Smith 2023-03-09 11:57:11 -05:00
parent 310c88303a
commit 28981534d5

View file

@ -143,25 +143,37 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
$(document).ready(function() { $(document).ready(function() {
var repository = "teaxyz/cli"; var repository = "teaxyz/cli";
var url = "https://api.github.com/repos/" + repository; 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") + ")"; var stargazers = "(" + numeral(data.stargazers_count).format("0.0a") + ")";
$(".stargazers").html(stargazers).hide().fadeIn(400); $(".stargazers").html(stargazers).hide().fadeIn(400);
}
}); });
}); });
</script> </script>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
var repository = "teaxyz/cli"; var repository = "teaxyz/cli";
var url = "https://api.github.com/repos/"+ repository +"/releases/latest"; 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; var release = data.tag_name;
$(".release").html(release).hide().fadeIn(400); $(".release").html(release).hide().fadeIn(400);
}
}); });
}); });
</script> </script>