Skip to content

Commit

Permalink
Merge pull request astrosonic#19 from s-katte/rate-limit-exceed
Browse files Browse the repository at this point in the history
modal for rate-limit-exceed added
  • Loading branch information
VaibhavSaini19 authored Sep 28, 2020
2 parents f2a8818 + f50e668 commit 9550bd7
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@
</body>
<script>
function makeplec() {
fetch("https://api.github.com/rate_limit")
.then((res) => res.json())
.then((temp) => {
if (temp.rate.remaining <= 0) {
$(".ui.basic.modal.rate-lmt").modal({
closable: false,
onDeny: function () {
window.alert("Wait not yet!");
return false;
},
onApprove: function () {
location.reload();
},
}).modal("show");
}
})
.catch((err) => console.log(err));

let repodict = {
"astrosonic": {
"a001": "astrosonic/bazooka-share",
Expand Down Expand Up @@ -140,9 +158,7 @@
}

}
})
)
.catch((err) => console.log(err));
}

let repodict = {
astrosonic: {
Expand Down Expand Up @@ -186,7 +202,7 @@
}
}
$("#body").append("<br/>");
}

function fetcizzu(loca, reponame) {
fetch("https://api.github.com/repos/" + reponame + "/issues")
.then((res) => res.json())
Expand Down

0 comments on commit 9550bd7

Please sign in to comment.