mirror of
https://codeberg.org/ashley/poke
synced 2026-03-03 16:43:45 +00:00
remove this to optimize cpu
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user