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 authored and Veiko Aasa committed 2020-06-29 10:09:20 +03:00
1 parent 3efff2fa42
commit c865a1cd89
2 files changed
+7 -11

No files matched your search

+5 -2
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,
@@ -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">