diff options
author | Sacha Chua <sacha@sachachua.com> | 2021-11-22 16:41:59 -0500 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2021-11-22 16:41:59 -0500 |
commit | ebfc1a4f6bde29f08f753c0ee93799e63b06b0bd (patch) | |
tree | 17f0bc1f854a99ce4d0fbd40c4f38e7e350ebd94 | |
parent | ab9e2e42b55579c45ab0b1f7182eb024f87d94ed (diff) | |
download | emacsconf-wiki-ebfc1a4f6bde29f08f753c0ee93799e63b06b0bd.tar.xz emacsconf-wiki-ebfc1a4f6bde29f08f753c0ee93799e63b06b0bd.zip |
Add transcript link
Diffstat (limited to '')
-rw-r--r-- | templates/page.tmpl | 9 | ||||
-rw-r--r-- | templates/vid.md | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl index d5ec57bf..6df947c6 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -295,6 +295,15 @@ Last edited <TMPL_VAR MTIME> // @license magnet:?xt=urn:btih:90dc5c0be029de84e523b9b3922520e79e0e6f08&dn=cc0.txt txt CC0-1.0 // Copyright (C) 2021 Sacha Chua if (document.querySelector('.times')) { document.querySelector('.times').prepend('Your local time: ~ ' + (new Date(document.querySelector('.times').getAttribute('start')).toLocaleString()) + ' to ~ ' + (new Date(document.querySelector('.times').getAttribute('end')).toLocaleString()) + "\n"); } + if (document.querySelector('a[name=transcript]')) { + 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 transcriptDiv = document.createElement('div'); +transcriptDiv.appendChild(transcriptLink) + if (resources) { resources.prepend(transcriptDiv); } + } // @license-end </script> </body> diff --git a/templates/vid.md b/templates/vid.md index 6e6850b1..b50349c4 100644 --- a/templates/vid.md +++ b/templates/vid.md @@ -7,7 +7,7 @@ <p><em>Your browser does not support the video tag, please download the video instead.</em></p> </video> <div class="resources"> - <a href="<TMPL_VAR src>"><TMPL_IF download><TMPL_VAR download><TMPL_ELSE>Download video</TMPL_IF><TMPL_IF duration>, <TMPL_VAR duration></TMPL_IF><TMPL_IF size>, <TMPL_VAR size></TMPL_IF></a> - <TMPL_IF subtitles><a href="<TMPL_VAR subtitles>">Download captions</a> </TMPL_IF> + <a href="<TMPL_VAR src>"><TMPL_IF download><TMPL_VAR download><TMPL_ELSE>Download video</TMPL_IF><TMPL_IF duration>, <TMPL_VAR duration></TMPL_IF><TMPL_IF size>, <TMPL_VAR size></TMPL_IF></a><br /> + <TMPL_IF subtitles><a href="<TMPL_VAR subtitles>">Download captions</a><br /></TMPL_IF> </div> </div> |