summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/page.tmpl14
1 files changed, 7 insertions, 7 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 1b694bd5..3f3044a9 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -65,22 +65,22 @@
This could be extended to accept hours in the time stamp as well, but currently does not.
*/
- var mainVideo;
- var timestamps;
+ let mainVideo;
+ let timestamps;
// expects a string like "mm:ss"
function parseSeconds(timeString) {
- times = timeString.split(":");
- minutes = parseFloat(times[0]);
- seconds = parseFloat(times[1]);
+ const times = timeString.split(":");
+ const minutes = parseFloat(times[0]);
+ const seconds = parseFloat(times[1]);
return (minutes * 60) + seconds;
}
window.onload = function initScript() {
mainVideo = document.getElementById("mainVideo");
timestamps = document.getElementsByClassName("time-link");
- len = timestamps.length;
- for (i = 0; i < len; i++) {
+ let len = timestamps.length;
+ for (let i = 0; i < len; i++) {
timestamps[i].onclick = function () {
mainVideo.currentTime = parseSeconds(this.innerText)
};