summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/page.tmpl20
1 files changed, 1 insertions, 19 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 906e246a..f74e9e2b 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -65,9 +65,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;
+ let timestamps;
// expects a string like "mm:ss.mmm"
function parseSeconds(timeString) {
@@ -79,10 +77,6 @@
function handleSubtitleClick(event) {
var video = event.target.getAttribute('data-video');
var start = event.target.getAttribute('data-start');
- let m = video.match(/(mainVideo|qnaVideo)-(.*)/);
- if (m) {
- video = m[2] + '-' + m[1];
- }
var videoElem = document.getElementById(video);
if (videoElem) {
videoElem.currentTime = parseSeconds(start);
@@ -94,22 +88,10 @@
}
window.onload = function initScript() {
- mainVideo = document.getElementById("mainVideo");
- qnaVideo = document.getElementById("qnaVideo");
- timestamps = document.getElementsByClassName("time-link");
- var len = timestamps.length;
- for (let i = 0; i < len; i++) {
- timestamps[i].onclick = function () {
- videoType = this.href.split("/").pop();
- video = (videoType == "#mainVideo") ? mainVideo : qnaVideo;
- video.currentTime = parseSeconds(this.innerText)
- };
- }
let subtitles = document.getElementsByClassName('subtitle');
for (let i = 0; i < subtitles.length; i++) {
subtitles[i].onclick = handleSubtitleClick;
}
-
}
// @license-end
</script>