diff --git a/funnel/assets/js/utils/lazyloadimage.js b/funnel/assets/js/utils/lazyloadimage.js index c92b5ea65..773317ec7 100644 --- a/funnel/assets/js/utils/lazyloadimage.js +++ b/funnel/assets/js/utils/lazyloadimage.js @@ -1,30 +1,7 @@ const LazyloadImg = { init(imgClassName) { - const intersectionObserverComponents = function intersectionObserverComponents() { - LazyloadImg.addObserver(imgClassName); - }; - if (document.querySelector(`.${imgClassName}`)) { - if ( - !( - 'IntersectionObserver' in global && - 'IntersectionObserverEntry' in global && - 'intersectionRatio' in IntersectionObserverEntry.prototype - ) - ) { - const polyfill = document.createElement('script'); - polyfill.setAttribute('type', 'text/javascript'); - polyfill.setAttribute( - 'src', - 'https://cdn.polyfill.io/v2/polyfill.min.js?features=IntersectionObserver', - ); - polyfill.onload = function loadintersectionObserverComponents() { - intersectionObserverComponents(); - }; - document.head.appendChild(polyfill); - } else { - intersectionObserverComponents(); - } + LazyloadImg.addObserver(imgClassName); } }, displayImages(img) {