summaryrefslogtreecommitdiffstats
path: root/templates/page.tmpl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/page.tmpl11
1 files changed, 7 insertions, 4 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 6d223308..cafc6835 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -49,17 +49,20 @@
return (minutes * 60) + seconds;
}
+ function seekToTime(seconds) {
+ console.log("handler", seconds)
+ mainVideo.currentTime = seconds;
+ }
+
window.onload = function initScript() {
- console.log("initializing seek to time script");
mainVideo = document.getElementById("mainVideo");
timestamps = document.getElementsByClassName("time-link");
len = timestamps.length;
for (i = 0; i < len; i++) {
seconds = parseSeconds(timestamps[i].innerText);
+ console.log("seconds: ", seconds);
- timestamps[i].onclick = function () {
- mainVideo.currentTime = seconds;
- }
+ timestamps[i].onclick = seekToTime(seconds);
}
}
</script>