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",
"description": "Otalk: WebRTC Enabled XMPP Client, in the Browser",
"version": "0.0.32",
"version": "0.0.33",
"dependencies": {
"andlog": "0.0.4",
"async": "0.2.9",

View File

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