Skip to content

Commit

Permalink
new js try, 2 scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Iris-TheRainbow committed Jun 20, 2024
1 parent 5cfad12 commit 4e57503
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions _tabs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function getOPR() {
axios.get("https://api.ftcscout.org/rest/v1/teams/15031/quick-stats?season=2023&region=All")
.then(response => {
var opr = Math.round((response.data["tot"]["value"])*100)/100;
document.getElementById("opr").innerHTML = opr;
var rank = Math.min(response.data["auto"]["rank"], response.data["dc"]["rank"], response.data["eg"]["rank"]);
var value = "";
var best = "";
Expand All @@ -25,18 +24,20 @@ function getOPR() {
best = "endgame";
value = response.data["eg"]["value"];
}
document.getElementById("opr").innerHTML = opr;
document.getElementById("value").innerHTML = Math.round(value*100)/100;
document.getElementById("best").innerHTML = best;
})};
</script>
<script>
function getNextSEN(){
axios.get("https://vlr.orlandomm.net/api/v1/teams/2")
.then(response => {
var team0 = response.data.data.upcoming["0"]["teams"]["0"]["tag"];
var team1 = response.data.data.upcoming["0"]["teams"]["1"]["tag"];
document.getElementById("team0").innerHTML = team0
document.getElementById("team1").innerHTML = team1
})
}
})};
</script>

</head>
Expand Down

0 comments on commit 4e57503

Please sign in to comment.