more code cleanup

This commit is contained in:
ferricles 2022-05-22 01:20:07 -07:00
parent e46ea31ba5
commit 20fe476f32

View file

@ -231,16 +231,12 @@ function show_tab(tab) {
}
function toggle_spell_tab(tab) {
let arrow_img = document.querySelector("#" + "arrow_" + tab + "Avg");
if (document.querySelector("#"+tab).style.display == "none") {
document.querySelector("#"+tab).style.display = "";
} else {
document.querySelector("#"+tab).style.display = "none";
}
let arrow_img = document.querySelector("#" + "arrow_" + tab + "Avg");
if (arrow_img.src.includes("down")) {
arrow_img.src = arrow_img.src.replace("down", "up");
} else {
document.querySelector("#"+tab).style.display = "none";
arrow_img.src = arrow_img.src.replace("up", "down");
}
}