Skip to content

Commit

Permalink
try again on js and fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Iris-TheRainbow committed Jun 20, 2024
1 parent 0b9423b commit 5cfad12
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions _tabs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ function getOPR() {
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"]);
document.getElementById("value").innerHTML = Math.round(value*100)/100;
var best = ""
var value = "";
var best = "";
if (rank == response.data["auto"]["rank"]){
best = "autonomus";
value = response.data["auto"]["value"];
} else if (rank == response.data["dc"]["rank"]){
best = "teleOp";
value = response.data["dc"]["value"]
} else if (rank == response.data["eg"]["rank"]){
best = "endgame";
value = response.data["eg"]["value"];
}
document.getElementById("value").innerHTML = Math.round(value*100)/100;
document.getElementById("best").innerHTML = best;
})};
function getNextSEN(){
Expand Down

0 comments on commit 5cfad12

Please sign in to comment.