Enable BOSH!

This commit is contained in:
Lance Stout 2014-02-18 20:44:15 -08:00
parent ac6e6a28cd
commit 7c9b30831d
3 changed files with 55 additions and 43 deletions

View File

@ -1,41 +1,44 @@
{
"name": "otalk.im",
"version": "0.0.25",
"description": "Otalk: WebRTC Enabled XMPP Client, in the Browser",
"repository": {
"type": "git",
"url": "git@github.com:andyet/otalk.git"
},
"dependencies": {
"async": "0.2.9",
"andlog": "0.0.4",
"attachmediastream": "1.0.1",
"backbone": "1.0.0",
"bows": "0.3.0",
"browserify": "2.25.1",
"crypto-browserify": "1.0.3",
"express": "3.3.7",
"getconfig": "0.0.5",
"getusermedia": "0.2.1",
"helmet": "0.1.0",
"human-model": "2.6.0",
"human-view": "1.5.0",
"jade": "0.35.0",
"jxt": "0.5.1",
"moonboots": "1.0.0",
"node-uuid": "1.4.1",
"notify.js": "0.0.3",
"oembed": "0.1.0",
"semi-static": "0.0.4",
"sound-effect-manager": "0.0.5",
"stanza.io": "3.1.1",
"staydown": "1.0.3",
"templatizer": "0.1.2",
"underscore": "1.5.1",
"wildemitter": "0.0.5"
},
"devDependencies": {
"precommit-hook": "0.3.6"
},
"main": "server.js"
"name": "otalk.im",
"description": "Otalk: WebRTC Enabled XMPP Client, in the Browser",
"version": "0.0.30",
"dependencies": {
"andlog": "0.0.4",
"async": "0.2.9",
"attachmediastream": "1.0.1",
"backbone": "1.0.0",
"bluebird": "1.0.0",
"bows": "0.3.0",
"browserify": "2.25.1",
"crypto-browserify": "1.0.3",
"express": "3.3.7",
"getconfig": "0.0.5",
"getusermedia": "0.2.1",
"helmet": "0.1.0",
"human-model": "2.6.0",
"human-view": "1.5.0",
"jade": "0.35.0",
"jxt": "0.6.0",
"moonboots": "1.0.0",
"node-uuid": "1.4.1",
"notify.js": "0.0.3",
"oembed": "0.1.0",
"semi-static": "0.0.4",
"sound-effect-manager": "0.0.5",
"stanza.io": "3.2.2",
"staydown": "1.0.3",
"templatizer": "0.1.2",
"underscore": "1.5.1",
"wildemitter": "1.0.1"
},
"devDependencies": {
"precommit-hook": "0.3.6"
},
"license": "MIT",
"main": "server.js",
"private": true,
"repository": {
"type": "git",
"url": "git@github.com:andyet/otalk.git"
}
}

View File

@ -1,19 +1,28 @@
$('#loginbox form').on('submit', function (e) {
var jid = $('#jid').val();
var password = $('#password').val();
var wsURL = $('#wsURL').val();
var connURL = $('#connURL').val();
var wsURL = '';
var boshURL = '';
if (connURL.indexOf('http') == 0) {
boshURL = connURL;
} else {
wsURL = wsURL;
}
localStorage.config = JSON.stringify({
jid: jid,
server: jid.slice(jid.indexOf('@') + 1),
wsURL: wsURL,
boshURL: boshURL,
credentials: {
password: password
}
});
window.location = '/';
e.preventDefault();
return false;
});

View File

@ -35,8 +35,8 @@ block content
label(for='password') Password
input(type='password', id='password', name='password', placeholder='•••••••••••••', tabindex='2')
.fieldContainer
label(for='wsURL') WebSocket URL
input(type='text', id='wsURL', name='wsURL', placeholder='wss://aweso.me:5281/xmpp-websocket', tabindex='3')
label(for='wsURL') WebSocket or BOSH URL
input(type='text', id='connURL', name='connURL', placeholder='wss://aweso.me:5281/xmpp-websocket', tabindex='3')
button(type='submit', tabindex='3', class="primary") Go!