summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2024-12-22 21:25:41 -0500
committerSacha Chua <sacha@sachachua.com>2024-12-22 21:25:41 -0500
commitb549329f942a3a449da821bb2dc443c9304edcfb (patch)
treeaa30ad64d64e3682bf0b5c20a9708406efc36a2c /templates
parente10d336fa2823431e4e25237700cbaf1bd1f5899 (diff)
downloademacsconf-wiki-b549329f942a3a449da821bb2dc443c9304edcfb.tar.xz
emacsconf-wiki-b549329f942a3a449da821bb2dc443c9304edcfb.zip
set both videos
Diffstat (limited to '')
-rw-r--r--templates/page.tmpl10
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();
}