diff options
author | Sacha Chua <sacha@sachachua.com> | 2023-12-02 13:14:00 -0500 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2023-12-02 13:15:49 -0500 |
commit | 0150f653898aaaa888a8d0cca4cdd6b361f761f2 (patch) | |
tree | 31b657924a57e8d4753e65992797c772ec11eb5d /templates | |
parent | 7cc376d870131f4b9e009d42cd663a4a0b975ef0 (diff) | |
download | emacsconf-wiki-0150f653898aaaa888a8d0cca4cdd6b361f761f2.tar.xz emacsconf-wiki-0150f653898aaaa888a8d0cca4cdd6b361f761f2.zip |
fix clickable captions, derp
Diffstat (limited to '')
-rw-r--r-- | templates/page.tmpl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl index 33885246..1f40aa66 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -76,9 +76,13 @@ }, 0); } - function handleSubtitleClick(event) { - var video = event.target.attributes['data-video'].value; - var start = event.target.attributes['data-start'].value + function handleSubtitleClick(event) { + var video = event.target.getAttribute('data-video'); + var start = event.target.getAttribute('data-start'); + let m = video.match(/(mainVideo|qnaVideo)-(.*)/); + if (m) { + video = m[2] + '-' + m[1]; + } var videoElem = document.getElementById(video); if (videoElem) { videoElem.currentTime = parseSeconds(start); |