Implements server side connection establishment

This commit is contained in:
hristoterezov
2016-03-28 16:19:32 -05:00
parent 0bde7de37b
commit bf9c4ea444
8 changed files with 201 additions and 51 deletions
+2 -14
View File
@@ -1,18 +1,6 @@
/* global $, $iq, config, interfaceConfig */
/* global $, $iq, config, interfaceConfig, getConfigParamsFromUrl */
var configUtils = require('./Util');
var params = {};
function getConfigParamsFromUrl() {
if (!location.hash)
return {};
var hash = location.hash.substr(1);
var result = {};
hash.split("&").forEach(function (part) {
var item = part.split("=");
result[item[0]] = JSON.parse(
decodeURIComponent(item[1]).replace(/\\&/, "&"));
});
return result;
}
params = getConfigParamsFromUrl();
@@ -62,4 +50,4 @@ var URLProcessor = {
}
};
module.exports = URLProcessor;
module.exports = URLProcessor;