From 09aab0784a8db4abaeeef836e02699e1d04d0ebc Mon Sep 17 00:00:00 2001 From: Ashley //// Date: Sun, 18 Feb 2024 11:59:50 +0000 Subject: [PATCH] remove this to optimize cpu --- html/poketube.ejs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/html/poketube.ejs b/html/poketube.ejs index 286a0ee9..1c2eccf1 100644 --- a/html/poketube.ejs +++ b/html/poketube.ejs @@ -1823,20 +1823,6 @@ if (/[?&]autoplay=/.test(location.search)) { } <% } %> -const lazyElements = document.querySelectorAll('*'); - -const observer = new IntersectionObserver((entries, observer) => { - entries.forEach(entry => { - if (entry.isIntersecting) { - entry.target.classList.add('loaded'); - observer.unobserve(entry.target); - } - }); -}); - -lazyElements.forEach(element => { - observer.observe(element); -});