-
Notifications
You must be signed in to change notification settings - Fork 1
/
infection_visuals.js
43 lines (39 loc) · 1.58 KB
/
infection_visuals.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
// show/hide buttons
var immune_recover = document.getElementById("dev_imm");
immune_recover.onclick = function() {
if (document.getElementById("dev_imm").checked) {
document.getElementById("immunity_settings").style.display = "block";
} else {
document.getElementById("immunity_settings").style.display = "none";
}
};
var immune_recover = document.getElementById("imm_recover");
immune_recover.onclick = function() {
if (document.getElementById("imm_recover").checked) {
document.getElementById("recovery_time_settings").style.display = "block";
} else {
document.getElementById("recovery_time_settings").style.display = "none";
}
};
var showhidegraphButton = document.getElementById("showhide_graph");
showhidegraphButton.onclick = function() {
if (document.getElementById("chart-container").style.display == "none") {
document.getElementById("chart-container").style.display = "block";
} else if (
document.getElementById("chart-container").style.display == "block"
) {
document.getElementById("chart-container").style.display = "none";
}
};
function openSetting(evt, tab_to_open) {
var setting_groups = document.getElementsByClassName("settings_group");
for (var i = 0; i < setting_groups.length; i++) {
setting_groups[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tab_button");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" tab-selected", "");
}
evt.currentTarget.className += " tab-selected";
document.getElementById(tab_to_open).style.display = "block";
}