diff --git a/src/index.js b/src/index.js index f9b272b..b715436 100644 --- a/src/index.js +++ b/src/index.js @@ -6,6 +6,7 @@ import { GetKeysym } from "./keyboard"; // In queue = var turn = -1; var perms = 0; +var connected = false; const vms = []; const users = []; const buttons = { @@ -348,6 +349,8 @@ function chatMessage(username, msg) { chatList.appendChild(tr); } async function openVM(url, node) { + if (connected) return; + connected = true; vm = new CollabVMClient(url); await vm.connect(); connected = true; @@ -399,4 +402,5 @@ votenobtn.addEventListener('click', () => vm.voteReset(false)); config.serverAddresses.forEach(multicollab); // Export some stuff -window.screenshotVM = screenshotVM; \ No newline at end of file +window.screenshotVM = screenshotVM; +window.multicollab = multicollab; \ No newline at end of file