summaryrefslogtreecommitdiffstats
path: root/templates/page.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/page.tmpl')
-rw-r--r--templates/page.tmpl21
1 files changed, 19 insertions, 2 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 28d650ad..3e94e1ae 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -37,6 +37,24 @@
</TMPL_LOOP>
</TMPL_UNLESS>
+<script>
+ var mainVideo;
+ var timestamps;
+
+ 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 = parseFloat(timestamps[i].dataset["timestamp"]);
+
+ timestamps[i].onclick = function () {
+ mainVideo.currentTime = seconds;
+ }
+ }
+ }
+</script>
</head>
<body>
@@ -48,7 +66,7 @@
<span>
<span class="parentlinks">
<TMPL_LOOP PARENTLINKS>
-<a href="<TMPL_VAR URL>"><TMPL_VAR PAGE></a>/
+<a href="<TMPL_VAR URL>"><TMPL_VAR PAGE></a>/
</TMPL_LOOP>
</span>
<span class="title">
@@ -221,6 +239,5 @@ Last edited <TMPL_VAR MTIME>
<TMPL_IF HTML5></footer><TMPL_ELSE></div></TMPL_IF>
<TMPL_IF HTML5></article><TMPL_ELSE></div></TMPL_IF>
-
</body>
</html>