summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGrant Shangreaux <grant@unabridgedsoftware.com>2020-12-29 21:52:55 -0600
committerGrant Shangreaux <grant@unabridgedsoftware.com>2020-12-29 21:52:55 -0600
commit6891dbc467940fa6052694e98ef55e07b48a40b9 (patch)
tree0bd40f3889dc5dfa9bc2b074da7081ea36e917cb /templates
parentdb056548315275f8ecba6611c57c053ecfc84fec (diff)
downloademacsconf-wiki-6891dbc467940fa6052694e98ef55e07b48a40b9.tar.xz
emacsconf-wiki-6891dbc467940fa6052694e98ef55e07b48a40b9.zip
Add: Q&A video jump to time
Diffstat (limited to '')
-rw-r--r--templates/page.tmpl6
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 3f3044a9..576f3d66 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -66,6 +66,7 @@
This could be extended to accept hours in the time stamp as well, but currently does not.
*/
let mainVideo;
+ let qnaVideo; // some pages have a questions and answers video
let timestamps;
// expects a string like "mm:ss"
@@ -78,11 +79,14 @@
window.onload = function initScript() {
mainVideo = document.getElementById("mainVideo");
+ qnaVideo = document.getElementById("qnaVideo");
timestamps = document.getElementsByClassName("time-link");
let len = timestamps.length;
for (let i = 0; i < len; i++) {
timestamps[i].onclick = function () {
- mainVideo.currentTime = parseSeconds(this.innerText)
+ const videoType = this.href.split("/").pop();
+ const video = (videoType == "#mainVideo") ? mainVideo : qnaVideo;
+ video.currentTime = parseSeconds(this.innerText)
};
}
}