diff options
Diffstat (limited to '')
-rw-r--r-- | templates/page.tmpl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl index 203f88ba..cc8357d7 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -79,12 +79,14 @@ var start = event.target.getAttribute('data-start'); const stickyVideo = document.querySelector('.transcript #' + video); const indexCardVideo = document.querySelector('.vid #' + video); - if (stickyVideo && window.getComputedStyle(stickyVideo).display == 'block') { - stickyVideo.currentTime = parseSeconds(start); - } else if (indexCardVideo) { + if (indexCardVideo) { indexCardVideo.currentTime = parseSeconds(start); - indexCardVideo.scrollIntoView(); } + if (stickyVideo && window.getComputedStyle(stickyVideo).display == 'block') { + stickyVideo.currentTime = parseSeconds(start); + } else { + indexCardVideo.scrollIntoView(); + } if (event.preventDefault) { event.preventDefault(); } |