-
Notifications
You must be signed in to change notification settings - Fork 0
/
carx.js
55 lines (55 loc) · 1.94 KB
/
carx.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
function changeWrench(target) {
wrenchWrap.style.backgroundColor = "black"
wrenchWrap.innerHTML = target
if (target >= 95) {
wrenchWrap.style.color = "#219c31"
} else if (target >= 90) {
wrenchWrap.style.color = "#6e9900"
} else if (target >= 80) {
wrenchWrap.style.color = "#999900"
} else if (target >= 70) {
wrenchWrap.style.color = "#998c00"
} else if (target >= 60) {
wrenchWrap.style.color = "#997500"
} else if (target >= 50) {
wrenchWrap.style.color = "#995c00"
} else if (target >= 40) {
wrenchWrap.style.color = "#994700"
} else if (target >= 30) {
wrenchWrap.style.color = "#993000"
} else if (target >= 20) {
wrenchWrap.style.color = "#990000"
} else if (target >= 10) {
wrenchWrap.style.color = ""
}
}
function logKey(e) {
if (e.code == "End") {
function changeWrench(target) {
wrenchWrap.style.backgroundColor = ""
wrenchWrap.innerHTML = ""
if (target >= 95) {
wrenchWrap.style.color = "#219c31"
} else if (target >= 90) {
wrenchWrap.style.color = "#6e9900"
} else if (target >= 80) {
wrenchWrap.style.color = "#999900"
} else if (target >= 70) {
wrenchWrap.style.color = "#998c00"
} else if (target >= 60) {
wrenchWrap.style.color = "#997500"
} else if (target >= 50) {
wrenchWrap.style.color = "#995c00"
} else if (target >= 40) {
wrenchWrap.style.color = "#994700"
} else if (target >= 30) {
wrenchWrap.style.color = "#993000"
} else if (target >= 20) {
wrenchWrap.style.color = "#990000"
} else if (target >= 10) {
wrenchWrap.style.color = ""
}
}
}
}
document.addEventListener("keypress", logKey)