From 23311e6c10b924710fa43a7e01068f884ef02e2f Mon Sep 17 00:00:00 2001 From: Holly Date: Thu, 3 Oct 2024 09:07:44 +0100 Subject: [PATCH] fix connect button --- client/Terminal-00-Multiuser.user.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/client/Terminal-00-Multiuser.user.js b/client/Terminal-00-Multiuser.user.js index deaefdf..d860cad 100644 --- a/client/Terminal-00-Multiuser.user.js +++ b/client/Terminal-00-Multiuser.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name MultiProbe // @namespace https://*.angusnicneven.com/* -// @version 20241003.0 +// @version 20241003.1 // @description Probe with friends! // @author tgpholly // @match https://*.angusnicneven.com/* @@ -55,7 +55,7 @@ console.log("[MP] MultiProbe init"); 'use strict'; // Make sure to change the userscript version too!!!!!!!!!! - const USERSCRIPT_VERSION_RAW = "20241003.0"; + const USERSCRIPT_VERSION_RAW = "20241003.1"; const USERSCRIPT_VERSION = parseInt(USERSCRIPT_VERSION_RAW.replace(".", "")); if (!continueRunningScript) { @@ -1154,7 +1154,6 @@ mp_button { loginForm.appendChild(buttons); const submitButton = document.createElement("mp_button"); submitButton.innerText = "Connect"; - submitButton.type = "submit"; buttons.appendChild(submitButton); const doNotButton = document.createElement("mp_button"); doNotButton.innerText = "Close"; @@ -1162,9 +1161,7 @@ mp_button { doNotButton.style.marginLeft = "1rem"; buttons.appendChild(doNotButton); - loginForm.onsubmit = (e) => { - e.preventDefault(); - + function performLogin() { username.disabled = true; password.disabled = true; submitButton.disabled = true; @@ -1201,6 +1198,13 @@ mp_button { }); } + submitButton.onclick = () => performLogin(); + loginForm.onsubmit = (e) => { + e.preventDefault(); + + performLogin(); + } + document.documentElement.appendChild(bg); }