You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
489 B
21 lines
489 B
function toggleDisabled(obj, state) {
|
|
if (state == "on") {
|
|
obj.setAttribute("disabled", "");
|
|
} else {
|
|
obj.removeAttribute("disabled");
|
|
}
|
|
}
|
|
|
|
function toggleHidden(obj, state) {
|
|
if (state == "off") {
|
|
obj.classList.remove("hidden");
|
|
} else {
|
|
obj.classList.add("hidden");
|
|
}
|
|
}
|
|
|
|
function setInfo(obj, txt, bcolor, fcolor) {
|
|
obj.innerText = txt;
|
|
obj.style.background = `var(--${bcolor})`;
|
|
obj.style.color = `var(--${fcolor})`;
|
|
} |