From 0ceea0f8699d02054ba86c8171ad834a8cdf4747 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Mon, 10 Jan 2022 16:58:33 +0100 Subject: .disabled instead of .[remove/set]Attribute() Doing .disabled = true is the same as .setAttribute("disabled", ""), same with .disabled = false, being the same as .removeAttribute("disabled") --- src/app/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/app/main.js b/src/app/main.js index 9c6619d..c365cf4 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -120,8 +120,8 @@ function installmod() { ipcRenderer.on("ns-updated", () => { setButtons(true); - updateBtn.innerText = lang('gui.update'); - northstar.removeAttribute('disabled'); + northstar.disabled = false; + updateBtn.innerText = lang("gui.update"); }) ipcRenderer.on("ns-updating", () => {setButtons(false)}) @@ -164,9 +164,9 @@ ipcRenderer.on("version", (event, versions) => { } // Since Northstar is not installed, we cannot launch it - updateBtn.innerText = lang('gui.installnorthstar'); - northstar.setAttribute('disabled', ''); + northstar.disabled = true; shouldInstallNorthstar = true; + updateBtn.innerText = lang("gui.installnorthstar"); } }); ipcRenderer.send("getversion"); -- cgit v1.2.3