Skip to content

Commit

Permalink
it works!
Browse files Browse the repository at this point in the history
  • Loading branch information
Iris-TheRainbow committed Jun 20, 2024
1 parent 0997f13 commit 52c62f0
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions _tabs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,19 @@ function getOPR() {
.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 = Math.min(response.data["auto"]["value"], response.data["dc"]["value"], response.data["eg"]["value"]);
console.log(value)
document.getElementById("value").innerHTML = Math.round(value*100)/100;
if (rank == response.data["auto"]["rank"]){
var best = "autonomus";
} else if (rank == response.data["dc"]["rank"]){
var best = "teleOp";
} else if (rank == response.data["eg"]["rank"]){
var best = "endgame";
}
document.getElementById("best").innerHTML = best;
})};
</script>
</head>

Expand All @@ -23,4 +35,4 @@ function getOPR() {

<p>My particular interests include combat robotics, Valorant Esports, and finding new ways to procrastinate doing my homework<p>

<p> BoltBusterZ OPR is currently: <b><span id = "opr"></span></b></p>
<p> BoltBusterZ OPR is currently <b><span id = "opr"></span></b>. Our best OPR is <b><span id = "best"></span></b> with <b><span id = "value"></span></b>.</p>

0 comments on commit 52c62f0

Please sign in to comment.