-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathiconhappymaker.js
31 lines (25 loc) · 969 Bytes
/
iconhappymaker.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const judgeStatusLabel = document.querySelector("#judge-status span");
let judgeStatus = judgeStatusLabel.textContent;
function changeColor() {
if (judgeStatus == "AC") {
if (judgeStatusLabel.style.backgroundColor == "rgb(92, 184, 92)") {
judgeStatusLabel.style.backgroundColor = "yellow";
} else {
judgeStatusLabel.style.backgroundColor = "rgb(92, 184, 92)";
}
} else if (judgeStatus == "TLE") {
console.log(judgeStatusLabel.style.backgroundColor);
}
}
setInterval(changeColor, 500);
// function changeColor() {
// if (judgeStatusBgColor == "#5cb85c") {
// judgeStatusBgColor = "yellow";
// } else if (judgeStatusBgColor == "#f0ad4e") {
// judgeStatusBgColor = "blue";
// } else if (judgeStatusBgColor == "yellow") {
// judgeStatusBgColor = "#5cb85c";
// } else if (judgeStatusBgColor == "blue") {
// judgeStatusBgColor = "#f0ad4e";
// }
// }