mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-26 04:28:45 +01:00
remove this to optimize cpu
This commit is contained in:
parent
4436f1dfdf
commit
09aab0784a
1 changed files with 0 additions and 14 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue