diff options
author | Sacha Chua <sacha@sachachua.com> | 2024-12-22 21:25:41 -0500 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2024-12-22 21:25:41 -0500 |
commit | b549329f942a3a449da821bb2dc443c9304edcfb (patch) | |
tree | aa30ad64d64e3682bf0b5c20a9708406efc36a2c /templates | |
parent | e10d336fa2823431e4e25237700cbaf1bd1f5899 (diff) | |
download | emacsconf-wiki-b549329f942a3a449da821bb2dc443c9304edcfb.tar.xz emacsconf-wiki-b549329f942a3a449da821bb2dc443c9304edcfb.zip |
set both videos
Diffstat (limited to 'templates')
-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(); } |