Actually use the given urls

This commit is contained in:
Lance Stout 2014-02-24 13:54:08 -08:00
parent 00ce7f60f6
commit 29ec69dfb2
2 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "otalk.im", "name": "otalk.im",
"description": "Otalk: WebRTC Enabled XMPP Client, in the Browser", "description": "Otalk: WebRTC Enabled XMPP Client, in the Browser",
"version": "0.0.32", "version": "0.0.33",
"dependencies": { "dependencies": {
"andlog": "0.0.4", "andlog": "0.0.4",
"async": "0.2.9", "async": "0.2.9",

View File

@ -3,12 +3,15 @@ $('#loginbox form').on('submit', function (e) {
var password = $('#password').val(); var password = $('#password').val();
var connURL = $('#connURL').val(); var connURL = $('#connURL').val();
var transport;
var wsURL = ''; var wsURL = '';
var boshURL = ''; var boshURL = '';
if (connURL.indexOf('http') == 0) { if (connURL.indexOf('http') === 0) {
boshURL = connURL; boshURL = connURL;
transport = 'bosh';
} else { } else {
wsURL = wsURL; wsURL = wsURL;
transport = 'websocket';
} }
localStorage.config = JSON.stringify({ localStorage.config = JSON.stringify({
@ -16,6 +19,7 @@ $('#loginbox form').on('submit', function (e) {
server: jid.slice(jid.indexOf('@') + 1), server: jid.slice(jid.indexOf('@') + 1),
wsURL: wsURL, wsURL: wsURL,
boshURL: boshURL, boshURL: boshURL,
transport: transport,
credentials: { credentials: {
password: password password: password
} }