Clean cryptpad-common

This commit is contained in:
yflory
2017-11-23 12:28:49 +01:00
parent 677ba9bc0f
commit 280a7c2765
27 changed files with 406 additions and 406 deletions

View File

@@ -0,0 +1,19 @@
define([
'/api/config'
], function (ApiConfig) {
var Config = {};
Config.getWebsocketURL = function () {
if (!ApiConfig.websocketPath) { return ApiConfig.websocketURL; }
var path = ApiConfig.websocketPath;
if (/^ws{1,2}:\/\//.test(path)) { return path; }
var protocol = window.location.protocol.replace(/http/, 'ws');
var host = window.location.host;
var url = protocol + '//' + host + path;
return url;
};
return Config;
});