From e92e6a8cacb172045eb87bd91e5035e6ba134a64 Mon Sep 17 00:00:00 2001 From: Holly Date: Fri, 19 Apr 2024 11:46:36 +0100 Subject: [PATCH] Fix bad logic on dialog --- client/Terminal-00-Multiuser.user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/Terminal-00-Multiuser.user.js b/client/Terminal-00-Multiuser.user.js index e2444aa..fa696a6 100644 --- a/client/Terminal-00-Multiuser.user.js +++ b/client/Terminal-00-Multiuser.user.js @@ -343,7 +343,7 @@ if (!window.TE_ACTIVE) { buttons.style.marginTop = "1rem"; dialog.appendChild(buttons); const submitButton = document.createElement("button"); - submitButton.innerText = localStorage["t00mp_username"] !== "" ? "Connect" : "Change Username"; + submitButton.innerText = (localStorage["t00mp_username"] && localStorage["t00mp_username"] === "") ? "Connect" : "Change Username"; submitButton.onclick = () => submitFunction(null); buttons.appendChild(submitButton); if (localStorage["t00mp_username"] !== "") { @@ -354,6 +354,7 @@ if (!window.TE_ACTIVE) { bg.remove(); window.location.href = window.location.href; } + buttons.appendChild(disconnectButton); } const doNotButton = document.createElement("button"); doNotButton.innerText = "Close";