diff mod_conversejs/templates/template.js @ 4165:6b2a1c9ef6e2

mod_conversejs: Move templates into a directory for easier install
author Kim Alvefur <zash@zash.se>
date Thu, 01 Oct 2020 17:49:10 +0200
parents mod_conversejs/template.js@1921ae4449b8
children 13b065432bf2
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mod_conversejs/templates/template.js	Thu Oct 01 17:49:10 2020 +0200
@@ -0,0 +1,8 @@
+if(typeof converse == 'undefined') {
+	var div = document.createElement("div");
+	var noscript = document.getElementsByTagName("noscript")[0];
+	div.innerHTML = noscript.innerText;
+	document.body.appendChild(div);
+} else {
+	converse.initialize(%s);
+}