Fix an issue that caused messages to double if you clicked a vm more than once
Expose the multicollab function
This commit is contained in:
parent
b9cd8b763a
commit
bf43f2533d
1 changed files with 5 additions and 1 deletions
|
@ -6,6 +6,7 @@ import { GetKeysym } from "./keyboard";
|
|||
// In queue = <queue position>
|
||||
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;
|
||||
|
@ -400,3 +403,4 @@ config.serverAddresses.forEach(multicollab);
|
|||
|
||||
// Export some stuff
|
||||
window.screenshotVM = screenshotVM;
|
||||
window.multicollab = multicollab;
|
Loading…
Reference in a new issue