jsxc: Remove inline javascript

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2020-06-27 12:53:24 -07:00 committed by Veiko Aasa
parent 3efff2fa42
commit c865a1cd89
No known key found for this signature in database
GPG Key ID: 478539CAE680674E
2 changed files with 7 additions and 11 deletions

View File

@ -44,9 +44,12 @@
*/
$(function() {
const body = document.querySelector('body');
const root = body.getAttribute('data-jsxc-root');
const domain = body.getAttribute('data-domain');
var settings = {
url: '/bosh/',
domain: plinth_settings.domainname
domain: domain
};
jsxc.init({
@ -58,7 +61,7 @@ $(function() {
},
checkFlash: false,
rosterAppend: 'body',
root: plinth_settings.jsxc_root,
root: root,
otr: {
debug: true,
SEND_WHITESPACE_TAG: true,

View File

@ -54,18 +54,11 @@
<script src="/javascript/jsxc/lib/jsxc.dep.js"></script>
<script src="/javascript/jsxc/jsxc.js"></script>
<script lang="text/javascript">
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 or later
var plinth_settings = {
"domainname": "{{ domainname }}",
"jsxc_root": "{% static 'jsxc/libjs-jsxc' %}"
};
// @license-end
</script>
<script src="{% static 'jsxc/jsxc-plinth.js' %}"></script>
</head>
<body>
<body data-domain="{{ domainname }}"
data-jsxc-root="{% static 'jsxc/libjs-jsxc' %}">
<div class="container" id="content" role="main">
<div class="row">
<div class="col-md-6 col-md-offset-3 col-xs-8 col-xs-offset-2">