willpower232/TOTPBTF3

View on GitHub
public_html/js/lazyload.js

Summary

Maintainability
A
0 mins
Test Coverage
!function(e){!function(n){if("IntersectionObserver"in window)n();else{var r=e.createElement("script");r.src="/js/intersectionobserver.min.js",r.onload=function(){n()},e.body.appendChild(r)}}(function(){var r=new IntersectionObserver(function(e){e.forEach(function(e){e.intersectionRatio>0&&(r.unobserve(e.target),n(e.target))})},{rootMargin:"50px 0px",threshold:.01});Array.from(e.querySelectorAll("[data-src]")).forEach(function(e){r.observe(e)})});var n=function(e){var n=new Image;n.onload=function(){e.src=e.dataset.src,delete e.dataset.src},n.src=e.dataset.src}}(document);