diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-06-26 20:57:06 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-06-26 20:57:06 -0300 |
commit | 08b700bb14e5e12c1dff283e2eef729816a97f15 (patch) | |
tree | 0494ff87d7ede3e0d7f561063c08c74011204486 /src/static/lazy-loading.js | |
parent | c6e9aba1f6d1239b3d884c2749d1f0d15c7662a1 (diff) |
lots of fixes from eslint
Diffstat (limited to 'src/static/lazy-loading.js')
-rw-r--r-- | src/static/lazy-loading.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/static/lazy-loading.js b/src/static/lazy-loading.js index 8f3e8cf..1b779d2 100644 --- a/src/static/lazy-loading.js +++ b/src/static/lazy-loading.js @@ -33,16 +33,17 @@ function lazyLoadMain() { } var lazyElements = document.getElementsByClassName('lazy'); + var i; if (window.IntersectionObserver) { observer = new IntersectionObserver(lazyLoad, { rootMargin: '200px', threshold: 1.0, }); - for (var i = 0; i < lazyElements.length; i++) { + for (i = 0; i < lazyElements.length; i++) { observer.observe(lazyElements[i]); } } else { - for (var i = 0; i < lazyElements.length; i++) { + for (i = 0; i < lazyElements.length; i++) { var element = lazyElements[i]; var original = element.getAttribute('data-original'); element.setAttribute('src', original); |