UNPKG

vanilla-lazyload

Version:

LazyLoad is a lightweight (2.4 kB) and flexible script that speeds up your web application by deferring the loading of your below-the-fold images, videos and iframes to when they will enter the viewport. It's written in plain "vanilla" JavaScript, it leve

2 lines (1 loc) 239 B
const e="undefined"!=typeof window,i=e&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),n=e&&window.devicePixelRatio>1;export{i as isBot,n as isHiDpi,e as runningOnBrowser};