aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/static/js/watch.js
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-09-01 15:14:06 -0500
committerJesús <heckyel@hyperbola.info>2021-09-01 15:14:06 -0500
commit06e091e020a2fecd1ef927edc4f55e999804b5f0 (patch)
tree842f58814c2e582afda76c0583e0ddf78a557d9c /youtube/static/js/watch.js
parent7143e1b321cc340606ebe91fdbcb8b956f4bcb6b (diff)
downloadyt-local-06e091e020a2fecd1ef927edc4f55e999804b5f0.tar.lz
yt-local-06e091e020a2fecd1ef927edc4f55e999804b5f0.tar.xz
yt-local-06e091e020a2fecd1ef927edc4f55e999804b5f0.zip
watch.js: video variable as const and improve data.time_start syntax
Diffstat (limited to 'youtube/static/js/watch.js')
-rw-r--r--youtube/static/js/watch.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/youtube/static/js/watch.js b/youtube/static/js/watch.js
index 38aab3f..f7e6285 100644
--- a/youtube/static/js/watch.js
+++ b/youtube/static/js/watch.js
@@ -1,4 +1,4 @@
-var video = document.getElementById('js-video-player');
+const video = document.getElementById('js-video-player');
function changeQuality(selection) {
var currentVideoTime = video.currentTime;
@@ -40,8 +40,7 @@ document.getElementById('quality-select').addEventListener(
);
// Set up video start time from &t parameter
-if (data.time_start != 0 && video)
- video.currentTime = data.time_start;
+if (data.time_start != 0 && video) {video.currentTime = data.time_start};
// External video speed control
var speedInput = document.getElementById('speed-control');