$(document).ready(function () {
	localStorage.clear()
	jsxc.options.set('favicon', {enable: false});
	jsxc.options.set('otr', {enable: false});
	jsxc.options.set('favicon', {enable: false});
	jsxc.options.set('xmpp', {'url': '/index.php/apps/ojsxc/http-bind'});
	jsxc.storage.setItem('debug', true);
	jsxc.storage.setItem('sid', '7862');
	jsxc.storage.setItem('rid', '897878733');
	jsxc.storage.setItem('lastActivity', (new Date()).getTime());
	jsxc.storage.setItem('jid', OC.currentUser + '@' + OC.getHost());
});
@@ -1,241 +1,61 @@
-$(document).ready(function () %7B%0A%09localStorage.clear()%0A%09jsxc.options.set('favicon', %7Benable: false%7D);%0A%09jsxc.options.set('otr', %7Benable: false%7D);%0A%09jsxc.options.set('favicon', %7Benable: false%7D);%0A%09jsxc.options.set('xmpp', %7B'url': '/index.php/
+/* global OC */%0A%0Ajsxc.options.xmpp.url = OC.generateUrl('
 apps
@@ -75,260 +75,7 @@
 ind'
-%7D
 );%0A
-%09jsxc.storage.setItem('debug', true);%0A%09jsxc.storage.setItem('sid', '7862');%0A%09jsxc.storage.setItem('rid', '897878733');%0A%09jsxc.storage.setItem('lastActivity', (new Date()).getTime());%0A%09jsxc.storage.setItem('jid', OC.currentUser + '@' + OC.getHost());%0A%7D);

clean up oc-backend.js