From b549329f942a3a449da821bb2dc443c9304edcfb Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sun, 22 Dec 2024 21:25:41 -0500 Subject: set both videos --- templates/page.tmpl | 10 ++++++---- 1 file 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(); } -- cgit v1.2.3