summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2021-11-24 01:58:58 -0500
committerSacha Chua <sacha@sachachua.com>2021-11-24 01:58:58 -0500
commit18dbbd8422930159a44f7421f1f1cc841cdb5b25 (patch)
tree024a525ab3d53c9013bbdd262711294430b62e4c
parent3a8e5c957c8f69f9bcb1addb2cbdcb675764115a (diff)
downloademacsconf-wiki-18dbbd8422930159a44f7421f1f1cc841cdb5b25.tar.xz
emacsconf-wiki-18dbbd8422930159a44f7421f1f1cc841cdb5b25.zip
More JS tweaks
-rw-r--r--templates/page.tmpl5
1 files changed, 4 insertions, 1 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index f93afdfc..6647f03a 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -299,11 +299,14 @@ Last edited <TMPL_VAR MTIME>
var transcriptLink = document.createElement('a');
transcriptLink.setAttribute('href', '#transcript');
transcriptLink.textContent = 'View transcript';
- var resources = document.querySelector('video[id="mainVideo"]').closest('.vid').querySelector('.resources');
+var video = document.querySelector('.mainVideo video');
+if (video) {
+ var resources = document.querySelector('.mainVideo video').closest('.vid').querySelector('.resources');
var transcriptDiv = document.createElement('div');
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>';
}