aboutsummaryrefslogtreecommitdiff
path: root/website/resources/js
diff options
context:
space:
mode:
Diffstat (limited to 'website/resources/js')
-rw-r--r--website/resources/js/main.js16
1 files changed, 16 insertions, 0 deletions
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);
})($);