From 230f330ebd29e5eb3a21b95528de2630c55d14d1 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Mon, 15 Apr 2024 23:35:02 +0800 Subject: [PATCH] undo autoformat --- scripts/GUI/windowman.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/GUI/windowman.js b/scripts/GUI/windowman.js index bc55221..3a28b0e 100644 --- a/scripts/GUI/windowman.js +++ b/scripts/GUI/windowman.js @@ -356,13 +356,11 @@ export default class windowman { input_elements.forEach(async (input_element) => { if (input_element.getAttribute("data-enable")) { // Enable the element. - input_element.disabled = !((await secretariat.read(input_element.getAttribute("data-enable"))) != null + input_element.disabled = ((await secretariat.read(input_element.getAttribute("data-enable"))) != null ? (typeof (await secretariat.read(input_element.getAttribute("data-enable")))).includes(`obj`) - ? (Object.keys(await secretariat.read(input_element.getAttribute("data-enable")))).length > 0 - : !!(await secretariat.read( - input_element.getAttribute("data-enable"), - )) - : false); + ? (Object.keys(await secretariat.read(input_element.getAttribute("data-enable")))).length <= 0 + : !(!!(await secretariat.read(input_element.getAttribute("data-enable")))) + : true); (input_element.disabled) ? input_element.classList.add(`disabled`) : input_element.classList.remove(`disabled`); // If it is under a list element (usually in navigation bars), then also disable that element too.