From 031da25e35cc3ca3bdc1e2783415d27fe83dc8d9 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 24 Apr 2019 00:41:05 +0200 Subject: [website] added the 7-lessons presentation as video --- website/resources/js/main.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'website/resources/js/main.js') diff --git a/website/resources/js/main.js b/website/resources/js/main.js index 5608a3c3..eaaf2df5 100644 --- a/website/resources/js/main.js +++ b/website/resources/js/main.js @@ -94,7 +94,23 @@ }); } + function seekVideo() { + var t = window.location.hash; + if (!t) return; + var s = /^#?(?:(\d\d?):)?(\d\d?):(\d\d?)$/.exec(t); + if (!s) return; + var videoj = $("#presentationVideo"); + if (!videoj || videoj.length == 0) return; + var video = videoj[0]; + var h = parseInt(s[1]); + if (!h) h = 0; + var m = parseInt(s[2]); + var s = parseInt(s[3]); + video.currentTime = (((h * 60) + m) * 60) + s; + } + $(ajaxFeaturePages); $(clickToTap); $(clickForVideo); + $(seekVideo); })($); -- cgit