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>
|
// In queue = <queue position>
|
||||||
var turn = -1;
|
var turn = -1;
|
||||||
var perms = 0;
|
var perms = 0;
|
||||||
|
var connected = false;
|
||||||
const vms = [];
|
const vms = [];
|
||||||
const users = [];
|
const users = [];
|
||||||
const buttons = {
|
const buttons = {
|
||||||
|
@ -348,6 +349,8 @@ function chatMessage(username, msg) {
|
||||||
chatList.appendChild(tr);
|
chatList.appendChild(tr);
|
||||||
}
|
}
|
||||||
async function openVM(url, node) {
|
async function openVM(url, node) {
|
||||||
|
if (connected) return;
|
||||||
|
connected = true;
|
||||||
vm = new CollabVMClient(url);
|
vm = new CollabVMClient(url);
|
||||||
await vm.connect();
|
await vm.connect();
|
||||||
connected = true;
|
connected = true;
|
||||||
|
@ -399,4 +402,5 @@ votenobtn.addEventListener('click', () => vm.voteReset(false));
|
||||||
config.serverAddresses.forEach(multicollab);
|
config.serverAddresses.forEach(multicollab);
|
||||||
|
|
||||||
// Export some stuff
|
// Export some stuff
|
||||||
window.screenshotVM = screenshotVM;
|
window.screenshotVM = screenshotVM;
|
||||||
|
window.multicollab = multicollab;
|
Loading…
Reference in a new issue