From 7f79269cf3811971b76834640c96af8069a61725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Wed, 23 Jun 2021 14:42:59 -0500 Subject: usage `let` not `var` --- youtube/templates/watch.html | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'youtube/templates') diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html index 47880b8..798e783 100644 --- a/youtube/templates/watch.html +++ b/youtube/templates/watch.html @@ -184,7 +184,7 @@ // IntersectionObserver isn't supported in pre-quantum // firefox versions, but the alternative of making it // manually is a performance drain, so oh well - var observer = new IntersectionObserver(lazyLoad, { + let observer = new IntersectionObserver(lazyLoad, { // where in relation to the edge of the viewport, we are observing rootMargin: "100px", @@ -205,7 +205,7 @@ }; // Tell our observer to observe all img elements with a "lazy" class - var lazyImages = document.querySelectorAll('img.lazy'); + let lazyImages = document.querySelectorAll('img.lazy'); lazyImages.forEach(img => { observer.observe(img); }); @@ -220,7 +220,7 @@ {% if settings.related_videos_mode != 0 or playlist %}