diff --git a/client/Terminal-00-Multiuser.user.js b/client/Terminal-00-Multiuser.user.js index 8b444f7..abc6dce 100644 --- a/client/Terminal-00-Multiuser.user.js +++ b/client/Terminal-00-Multiuser.user.js @@ -35,6 +35,8 @@ if (!window.TE_ACTIVE) { const windowLocation = window.location.href; window.multiprobe_debug = false; +console.log("[MP] MultiProbe init"); + (function() { 'use strict'; @@ -61,6 +63,7 @@ window.multiprobe_debug = false; }; let cursorImageI = window.getComputedStyle(document.body).cursor; + console.log("[MP] Injecting custom styles..."); const styles = document.createElement("style"); styles.innerHTML = ` html { @@ -288,15 +291,18 @@ kbd { }, 1000); let needsToUpdate = false; + console.log("[MP] Checking for new versions..."); const versionFetchAddress = windowLocation.replace("127.0.0.1", "localhost").includes("//localhost:") ? "http://localhost:38194/api/version" : "https://multiprobe.eusv.net/api/version"; fetch(versionFetchAddress, { method: "post" }).then(response => { - console.log("hi"); response.text().then(versionNumberRaw => { const versionNumber = parseInt(versionNumberRaw); if (versionNumber > USERSCRIPT_VERSION) { // We're out of date >:( needsToUpdate = true; createUpdateDialog(`${versionNumberRaw.slice(0, versionNumberRaw.length - 1)}.${versionNumberRaw.slice(-1)}`); + console.log("[MP] We're out of date :("); + } else { + console.log("[MP] We're up to date!"); } }); }); @@ -439,7 +445,6 @@ kbd { groupPopper.click(); } } - console.log(e.key); } window.onkeydown = (e) => { @@ -491,9 +496,11 @@ kbd { function doConnect(apiKey) { const Buffer = getBufferClass(); + console.log("[MP] Connecting to realtime server..."); ws = new WebSocket(windowLocation.includes("//localhost:") ? "ws://localhost:38195" : "wss://ws.eusv.net/t00mp"); let keepAliveInterval; ws.onopen = () => { + console.log("[MP] Connected! Authenticating..."); otherCursors.innerHTML = ""; selfCursor = new RemoteClient(localStorage["t00mp_username"]); selfCursor.probeImage.style.visibility = "hidden"; @@ -534,6 +541,7 @@ kbd { if (!needsToUpdate) { createFirstTimeDialog(); } + console.log("[MP] Authenticated!"); break; } case MessageType.ClientJoined: @@ -865,4 +873,6 @@ kbd { if (localStorage["mpapikey"] && localStorage["mpapikey"] !== "" && localStorage["mpconnectonload"] === "true") { doConnect(localStorage["mpapikey"]); } + + console.log("[MP] Init complete."); })(); \ No newline at end of file