Browse Source

.php extension removed

pull/14/merge
Amir 9 years ago
parent
commit
7cfe2bdded
  1. 29
      js/config.js

29
js/config.js

@ -5,10 +5,10 @@ @@ -5,10 +5,10 @@
'use strict';
const wsChat = new WebSocket("ws://localhost:8080/comm");
const appRoot = setAppRoot('webrtc-ratchet-chat-app', '');
const spinnerClass = 'fa fa-spinner faa-spin animated';
function setAppRoot(devFolderName, prodFolderName){
var hostname = window.location.hostname;
@ -33,4 +33,31 @@ function setAppRoot(devFolderName, prodFolderName){ @@ -33,4 +33,31 @@ function setAppRoot(devFolderName, prodFolderName){
}
return appRoot;
}
/*
********************************************************************************************************************************
********************************************************************************************************************************
********************************************************************************************************************************
********************************************************************************************************************************
********************************************************************************************************************************
*/
function getRoom(){
var params = window.location.search.substr(1).split("&");
if(params){
for(let i = 0; i < params.length; i++){
var key = params[i].split("=")[0];
var value = params[i].split("=")[1];
if(key === "room"){
return value;
}
}
}
else{
return "";
}
}
Loading…
Cancel
Save