support different ports for websocket and http

This commit is contained in:
Caleb James DeLisle
2014-11-03 11:13:41 +01:00
parent 8d7c85f287
commit 5ae599fa07
3 changed files with 20 additions and 4 deletions

View File

@@ -1,9 +1,10 @@
define([
'api/config?cb=' + Math.random().toString(16).substring(2),
'realtime-wysiwyg',
'bower/jquery/dist/jquery.min',
'bower/ckeditor/ckeditor',
'bower/tweetnacl/nacl-fast.min'
], function (RTWysiwyg) {
'bower/tweetnacl/nacl-fast.min',
], function (Config, RTWysiwyg) {
var Ckeditor = window.CKEDITOR;
var Nacl = window.nacl;
var $ = jQuery;
@@ -56,7 +57,7 @@ define([
ifr.contentDocument.body.innerHTML = INITIAL_STATE;
var rtw =
RTWysiwyg.start(window.location.href.replace(/#.*$/, '').replace(/^http/, 'ws'),
RTWysiwyg.start(Config.websocketURL,
userName(),
{},
Nacl.util.encodeBase64(key.lookupKey).substring(0,10),