Mercurial > prosody-modules
annotate mod_conversejs/template.js @ 3802:f88e07630e4e
mod_rest: Add support for simple Bearer token auth
Token specified in config
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 31 Dec 2019 03:37:46 +0100 |
parents | 1921ae4449b8 |
children |
rev | line source |
---|---|
3598
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 if(typeof converse == 'undefined') { |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 var div = document.createElement("div"); |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 var noscript = document.getElementsByTagName("noscript")[0]; |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 div.innerHTML = noscript.innerText; |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 document.body.appendChild(div); |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 } else { |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 converse.initialize(%s); |
1921ae4449b8
mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 } |