summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to '')
-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);