diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-10-16 16:59:34 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-10-16 16:59:34 -0400 |
commit | 1e6a1c9271be33f24f224d14ff70cce8e9c9dc25 (patch) | |
tree | 2fad0795374b84d8b3da7a306c608a8122c169bc /templates | |
parent | 69964d3dafde4ccacedbdec7a71771df8fddbfb3 (diff) | |
download | emacsconf-wiki-1e6a1c9271be33f24f224d14ff70cce8e9c9dc25.tar.xz emacsconf-wiki-1e6a1c9271be33f24f224d14ff70cce8e9c9dc25.zip |
Update chat embed to join the right channels
Diffstat (limited to 'templates')
-rw-r--r-- | templates/page.tmpl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl index de59944d..0ee9e811 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -319,8 +319,14 @@ transcriptDiv.appendChild(transcriptLink) if (resources) { resources.prepend(transcriptDiv); } } } - if (document.querySelector('.chat-iframe')) { - document.querySelector('.chat-iframe').innerHTML = '<iframe src="https://chat.emacsconf.org" height="600" width="100%"></iframe>'; + var chat = document.querySelector('.chat-iframe'); + if (chat) { + if (chat.getAttribute('data-track')) { + chat.innerHTML = '<iframe src="https://chat.emacsconf.org?join=emacsconf,emacsconf-' + + chat.getAttribute('data-track').replace(/[^A-Za-z]/g, '') + '" height="600" width="100%"></iframe>'; + } else { + chat.innerHTML = '<iframe src="https://chat.emacsconf.org" height="600" width="100%"></iframe>'; + } } // @license-end |