Software /
code /
prosody-modules
Comparison
mod_conversejs/mod_conversejs.lua @ 3305:122767430a97
mod_conversejs: Remove view_mode CSS switching
Not required as of converse.js 4.0.0
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 08 Sep 2018 23:31:06 +0200 |
parent | 3040:81b75086a781 |
child | 3309:c34f9fd632a6 |
comparison
equal
deleted
inserted
replaced
3304:27db90321e7b | 3305:122767430a97 |
---|---|
12 local template = [[ | 12 local template = [[ |
13 <!DOCTYPE html> | 13 <!DOCTYPE html> |
14 <html> | 14 <html> |
15 <head> | 15 <head> |
16 <meta charset="utf-8"> | 16 <meta charset="utf-8"> |
17 <link rel="stylesheet" type="text/css" media="screen" href="https://cdn.conversejs.org/css/%s.min.css"> | 17 <link rel="stylesheet" type="text/css" media="screen" href="https://cdn.conversejs.org/css/converse.min.css"/> |
18 <script charset="utf-8" src="https://cdn.conversejs.org/dist/converse.min.js"></script> | 18 <script charset="utf-8" src="https://cdn.conversejs.org/dist/converse.min.js"/> |
19 </head> | 19 </head> |
20 <body> | 20 <body> |
21 <noscript> | 21 <noscript> |
22 <h1>Converse.js</h1> | 22 <h1>Converse.js</h1> |
23 <p>I'm sorry, but this XMPP client application won't work without JavaScript.</p> | 23 <p>I'm sorry, but this XMPP client application won't work without JavaScript.</p> |
57 domain_placeholder = module.host; | 57 domain_placeholder = module.host; |
58 allow_registration = allow_registration; | 58 allow_registration = allow_registration; |
59 registration_domain = allow_registration and module.host or nil; | 59 registration_domain = allow_registration and module.host or nil; |
60 }; | 60 }; |
61 | 61 |
62 local view_mode_css = "converse"; | |
63 if type(more_options) == "table" then | |
64 for k,v in pairs(more_options) do | |
65 converse_options[k] = v; | |
66 end | |
67 if more_options.view_mode == "fullscreen" then | |
68 view_mode_css = "inverse"; | |
69 end | |
70 end | |
71 | |
72 event.response.headers.content_type = "text/html"; | 62 event.response.headers.content_type = "text/html"; |
73 return template:format(view_mode_css, json_encode(converse_options)); | 63 return template:format(json_encode(converse_options)); |
74 end; | 64 end; |
75 } | 65 } |
76 }); | 66 }); |
77 | 67 |