From 90459f28ebfd5f87ff994010db298571593c26cd Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sun, 28 Nov 2021 09:13:22 -0500 Subject: Update --- templates/page.tmpl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'templates') diff --git a/templates/page.tmpl b/templates/page.tmpl index 0b483c26..235d3aa9 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -80,18 +80,18 @@ mainVideo = document.getElementById("mainVideo"); qnaVideo = document.getElementById("qnaVideo"); timestamps = document.getElementsByClassName("time-link"); - let len = timestamps.length; + var len = timestamps.length; for (let i = 0; i < len; i++) { timestamps[i].onclick = function () { - const videoType = this.href.split("/").pop(); - const video = (videoType == "#mainVideo") ? mainVideo : qnaVideo; + videoType = this.href.split("/").pop(); + video = (videoType == "#mainVideo") ? mainVideo : qnaVideo; video.currentTime = parseSeconds(this.innerText) }; } - let handleSubtitleClick = function(event) { - let video = event.target.attributes['data-video'].value; - let start = event.target.attributes['data-start'].value - let videoElem = document.getElementById(video); + handleSubtitleClick = function(event) { + video = event.target.attributes['data-video'].value; + start = event.target.attributes['data-start'].value + videoElem = document.getElementById(video); if (videoElem) { videoElem.currentTime = parseSeconds(start); videoElem.scrollIntoView(); -- cgit v1.2.3