From 6544af8f3013ecf1b41d0944c596949f681b406e Mon Sep 17 00:00:00 2001 From: Akilan Date: Fri, 10 Mar 2023 17:32:02 +0000 Subject: [PATCH] added old js code --- files/static/main.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/files/static/main.js b/files/static/main.js index e82f188..2232a89 100644 --- a/files/static/main.js +++ b/files/static/main.js @@ -180,11 +180,21 @@ function initUI() { //getting server hostname getServerIPandHostname() - // LaplaceVar.ui.joinForm.onsubmit = async e => { - // e.preventDefault(); - - // await doJoin(LaplaceVar.roomID,LaplaceVar.barrierIP); - // }; + LaplaceVar.ui.joinForm.onsubmit = async e => { + e.preventDefault(); + LaplaceVar.roomID = LaplaceVar.ui.inputRoomID.value; + LaplaceVar.barrierIP = LaplaceVar.ui.barrierIP.value; + // check if the following action is executed + console.log("here") + // Check if the ip address for barrier is given + if(LaplaceVar.barrierIP == "") { + window.history.pushState('', '', getJoinUrl(LaplaceVar.roomID)); + } + else { + window.history.pushState('', '', getJoinUrl(LaplaceVar.roomID,LaplaceVar.barrierIP)); + } + await doJoin(LaplaceVar.roomID,LaplaceVar.barrierIP); + }; LaplaceVar.ui.btnStream.onclick = async () => { window.history.pushState('', '', getStreamUrl()); @@ -240,16 +250,6 @@ function initUI() { LaplaceVar.barrierIP = urlParams.get('barrierip') - LaplaceVar.roomID = LaplaceVar.ui.inputRoomID.value; - LaplaceVar.barrierIP = LaplaceVar.ui.barrierIP.value; - // Check if the ip address for barrier is given - if(LaplaceVar.barrierIP == "") { - window.history.pushState('', '', getJoinUrl(LaplaceVar.roomID)); - } - else { - window.history.pushState('', '', getJoinUrl(LaplaceVar.roomID,LaplaceVar.barrierIP)); - } - print("Logs:"); print("[+] Page loaded");