js fix
This commit is contained in:
@@ -180,15 +180,10 @@ function initUI() {
|
|||||||
//getting server hostname
|
//getting server hostname
|
||||||
getServerIPandHostname()
|
getServerIPandHostname()
|
||||||
|
|
||||||
// LaplaceVar.ui.joinForm.onsubmit = async e => {
|
LaplaceVar.ui.joinForm.onsubmit = async e => {
|
||||||
// e.preventDefault();
|
e.preventDefault();
|
||||||
LaplaceVar.roomID = LaplaceVar.ui.inputRoomID.value;
|
LaplaceVar.roomID = LaplaceVar.ui.inputRoomID.value;
|
||||||
// LaplaceVar.barrierIP = LaplaceVar.ui.barrierIP.value;
|
LaplaceVar.barrierIP = LaplaceVar.ui.barrierIP.value;
|
||||||
|
|
||||||
let urlParams1;
|
|
||||||
urlParams1 = new URLSearchParams(window.location.search)
|
|
||||||
LaplaceVar.barrierIP = urlParams1.get('barrierip')
|
|
||||||
|
|
||||||
// Check if the ip address for barrier is given
|
// Check if the ip address for barrier is given
|
||||||
if(LaplaceVar.barrierIP == "") {
|
if(LaplaceVar.barrierIP == "") {
|
||||||
window.history.pushState('', '', getJoinUrl(LaplaceVar.roomID));
|
window.history.pushState('', '', getJoinUrl(LaplaceVar.roomID));
|
||||||
@@ -196,8 +191,8 @@ function initUI() {
|
|||||||
else {
|
else {
|
||||||
window.history.pushState('', '', getJoinUrl(LaplaceVar.roomID,LaplaceVar.barrierIP));
|
window.history.pushState('', '', getJoinUrl(LaplaceVar.roomID,LaplaceVar.barrierIP));
|
||||||
}
|
}
|
||||||
doJoin(LaplaceVar.roomID,LaplaceVar.barrierIP);
|
await doJoin(LaplaceVar.roomID,LaplaceVar.barrierIP);
|
||||||
// };
|
};
|
||||||
|
|
||||||
LaplaceVar.ui.btnStream.onclick = async () => {
|
LaplaceVar.ui.btnStream.onclick = async () => {
|
||||||
window.history.pushState('', '', getStreamUrl());
|
window.history.pushState('', '', getStreamUrl());
|
||||||
@@ -242,7 +237,7 @@ function initUI() {
|
|||||||
const queryString = window.location.search;
|
const queryString = window.location.search;
|
||||||
|
|
||||||
// Getting url parameters from the URL
|
// Getting url parameters from the URL
|
||||||
let urlParams = new URLSearchParams(queryString);
|
const urlParams = new URLSearchParams(queryString);
|
||||||
|
|
||||||
// Running headless mode
|
// Running headless mode
|
||||||
if(urlParams.get('mode') == "headless") {
|
if(urlParams.get('mode') == "headless") {
|
||||||
@@ -251,6 +246,8 @@ function initUI() {
|
|||||||
// },2000)
|
// },2000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LaplaceVar.barrierIP = urlParams.get('barrierip')
|
||||||
|
|
||||||
|
|
||||||
print("Logs:");
|
print("Logs:");
|
||||||
print("[+] Page loaded");
|
print("[+] Page loaded");
|
||||||
|
|||||||
Reference in New Issue
Block a user