use websocket url configuration api

pull/1/head
ansuz 8 years ago
parent dbc8f01b8b
commit a28daf2715

@ -1,6 +1,5 @@
require.config({ paths: { 'json.sortify': '/bower_components/json.sortify/dist/JSON.sortify' } }); require.config({ paths: { 'json.sortify': '/bower_components/json.sortify/dist/JSON.sortify' } });
define([ define([
'/api/config?cb=' + Math.random().toString(16).substring(2),
'/customize/messages.js?app=code', '/customize/messages.js?app=code',
'/bower_components/chainpad-crypto/crypto.js', '/bower_components/chainpad-crypto/crypto.js',
'/bower_components/chainpad-netflux/chainpad-netflux.js', '/bower_components/chainpad-netflux/chainpad-netflux.js',
@ -16,7 +15,7 @@ define([
'/bower_components/file-saver/FileSaver.min.js', '/bower_components/file-saver/FileSaver.min.js',
'/bower_components/jquery/dist/jquery.min.js', '/bower_components/jquery/dist/jquery.min.js',
'/customize/pad.js' '/customize/pad.js'
], function (Config, /*RTCode,*/ Messages, Crypto, Realtime, TextPatcher, Toolbar, JSONSortify, JsonOT, Cryptpad, Modes, Themes, Visible, Notify) { ], function (Messages, Crypto, Realtime, TextPatcher, Toolbar, JSONSortify, JsonOT, Cryptpad, Modes, Themes, Visible, Notify) {
var $ = window.jQuery; var $ = window.jQuery;
var saveAs = window.saveAs; var saveAs = window.saveAs;
@ -134,7 +133,7 @@ define([
var config = { var config = {
//initialState: Messages.codeInitialState, //initialState: Messages.codeInitialState,
initialState: '{}', initialState: '{}',
websocketURL: Config.websocketURL, websocketURL: Cryptpad.getWebsocketURL(),
channel: secret.channel, channel: secret.channel,
// our public key // our public key
validateKey: secret.keys.validateKey || undefined, validateKey: secret.keys.validateKey || undefined,

@ -865,7 +865,7 @@ define([
}; };
var config = { var config = {
websocketURL: Config.websocketURL, websocketURL: Cryptpad.getWebsocketURL(),
channel: secret.channel, channel: secret.channel,
data: {}, data: {},
// our public key // our public key

@ -1,6 +1,5 @@
require.config({ paths: { 'json.sortify': '/bower_components/json.sortify/dist/JSON.sortify' } }); require.config({ paths: { 'json.sortify': '/bower_components/json.sortify/dist/JSON.sortify' } });
define([ define([
'/api/config?cb=' + Math.random().toString(16).substring(2),
'/customize/messages.js?app=code', '/customize/messages.js?app=code',
'/bower_components/chainpad-crypto/crypto.js', '/bower_components/chainpad-crypto/crypto.js',
'/bower_components/chainpad-netflux/chainpad-netflux.js', '/bower_components/chainpad-netflux/chainpad-netflux.js',
@ -17,7 +16,7 @@ define([
'/bower_components/file-saver/FileSaver.min.js', '/bower_components/file-saver/FileSaver.min.js',
'/bower_components/jquery/dist/jquery.min.js', '/bower_components/jquery/dist/jquery.min.js',
'/customize/pad.js' '/customize/pad.js'
], function (Config, /*RTCode,*/ Messages, Crypto, Realtime, TextPatcher, Toolbar, JSONSortify, JsonOT, Cryptpad, Modes, Themes, Visible, Notify, Slide) { ], function (Messages, Crypto, Realtime, TextPatcher, Toolbar, JSONSortify, JsonOT, Cryptpad, Modes, Themes, Visible, Notify, Slide) {
var $ = window.jQuery; var $ = window.jQuery;
var saveAs = window.saveAs; var saveAs = window.saveAs;
@ -169,7 +168,7 @@ define([
var config = { var config = {
//initialState: Messages.codeInitialState, //initialState: Messages.codeInitialState,
initialState: '{}', initialState: '{}',
websocketURL: Config.websocketURL, websocketURL: Cryptpad.getWebsocketURL(),
channel: secret.channel, channel: secret.channel,
// our public key // our public key
validateKey: secret.keys.validateKey || undefined, validateKey: secret.keys.validateKey || undefined,

Loading…
Cancel
Save