Converse.js XMPP/Jabber client
Some time I was looking for any solution to connect to my Jabber account. I had only two requirements - client must be portable and must support OTR protocol. For a while I used portable Pidgin, but I must download every time I get to new computer. Then, I find converse.js, open source Jabber webchat client with OTR support, which can be integrated in any website. Installation is very easy, you only have to download converse.js source from GitHub to web server root directory.
apt-get install git-core
Now change directory to server root
cd /srv/www
git clone https://github.com/jcbrand/converse.js.git
Change bold black to your server root directory. After a succesful download, edit your web server`s index.html.
nano /srv/www/index.html
And replace original file with this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>converse.js</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="stylesheet" media="screen" href="stylesheets/stylesheet.css">
<link rel="stylesheet" media="screen" href="converse.css">
<script data-main="main" src="components/requirejs/require.js"></script>
<script src="builds/converse.min.js"></script>
</head>
<body>
<div id="conversejs"></div>
</body>
<script>
require(['converse'], function (converse) {
converse.initialize({
allow_otr: true,
auto_list_rooms: false,
auto_subscribe: false,
bosh_service_url: 'https://conversejs.org/http-bind',
debug: true ,
hide_muc_server: false,
i18n: locales['en'],
prebind: false,
show_controlbox_by_default: true,
xhr_user_search: false,
});
});
</script>
</html>
Now if you visit your website`s index.html, you should see empty page with chat pop-up window. You can login to your account.
Connection between your browser and destination XMPP server is provided by BOSH server of conversejs.org. You can also host own BOSH server, for example ejabberd server is configured properly to act as BOSH server in default configuration. After installing ejabberd only set "bosh_service_url" (index.html - line 20) to your ejabberd server.
Converse.js also supports OTR as you can see on second picture, all you need is to click on red "unencrypted" icon. Converse.js have also support for multiuser chatrooms. If you do not have Jabber account yet, visit xmpp.net and register account at one of providers. I strongly recommend jabbim.cz, jabber.me and jabber.org (new registrations are temporarily not available).