From 3d87374e6cf3cd67c7d392c37b46ee3fb37776ab Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Fri, 20 Jun 2025 19:18:25 +0200 Subject: [PATCH] this is more consistent when the user interacts with the checkbox --- static/webui/script.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/static/webui/script.js b/static/webui/script.js index 73664b9f..fe065efe 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -1835,11 +1835,7 @@ single.getRoute("/webui/cheats").on("beforeload", function () { var x = document.getElementById(`${key}`); if (x != null) { if (x.type == "checkbox") { - if (value === true) { - x.setAttribute("checked", "checked"); - } else { - x.removeAttribute("checked"); - } + x.checked = value; } else if (x.type == "number") { x.setAttribute("value", `${value}`); }