From c865a1cd89995e14a37d3f48c3684deb5ef32d8e Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sat, 27 Jun 2020 12:53:24 -0700 Subject: [PATCH] jsxc: Remove inline javascript Signed-off-by: Sunil Mohan Adapa Reviewed-by: Veiko Aasa --- plinth/modules/jsxc/static/jsxc-plinth.js | 7 +++++-- plinth/modules/jsxc/templates/jsxc_launch.html | 11 ++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/plinth/modules/jsxc/static/jsxc-plinth.js b/plinth/modules/jsxc/static/jsxc-plinth.js index d0235a499..cfbb9c14e 100644 --- a/plinth/modules/jsxc/static/jsxc-plinth.js +++ b/plinth/modules/jsxc/static/jsxc-plinth.js @@ -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, diff --git a/plinth/modules/jsxc/templates/jsxc_launch.html b/plinth/modules/jsxc/templates/jsxc_launch.html index 06e7269a0..afa7ab433 100644 --- a/plinth/modules/jsxc/templates/jsxc_launch.html +++ b/plinth/modules/jsxc/templates/jsxc_launch.html @@ -54,18 +54,11 @@ - - +