summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2023-12-02 13:14:00 -0500
committerSacha Chua <sacha@sachachua.com>2023-12-02 13:15:49 -0500
commit0150f653898aaaa888a8d0cca4cdd6b361f761f2 (patch)
tree31b657924a57e8d4753e65992797c772ec11eb5d
parent7cc376d870131f4b9e009d42cd663a4a0b975ef0 (diff)
downloademacsconf-wiki-0150f653898aaaa888a8d0cca4cdd6b361f761f2.tar.xz
emacsconf-wiki-0150f653898aaaa888a8d0cca4cdd6b361f761f2.zip
fix clickable captions, derp
-rw-r--r--templates/page.tmpl10
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);