lazyload-timer

1.0.9 • Public • Published

Lazy Listener Package

Package has implemented lazy loading for images and videos. Package functions logs informations such as div name, visibility in percent, div height and width. There is also a function that gives information about video duration, current video time and percent of the video played.
To lazy load images, image src attribute have to be replaced with lazy-src and video src attribute have to be changed to lazy-vid.

List of functions included:

Function description
config('classname',interval in ms) set configuration for timer, which is counting how long divs
from given class are visible above 50%,
printdata() log informations about percent of visibility and
time of visibility above 50% of divs from given class,
printdataloop() logs informations in loop every interval set
stopprint() stops logging informations
timerclear() restart timers, use it everytime when you change config
alldiv('classname') logs informations about every div from given class
on your website
selecteddiv(divname) logs informations about selected div
divposition(divname) logs distance from div footer to the top of site and from div
top to the site footer
time() logs informations about video

Readme

Keywords

none

Package Sidebar

Install

npm i lazyload-timer

Weekly Downloads

1

Version

1.0.9

License

ISC

Unpacked Size

8.75 kB

Total Files

3

Last publish

Collaborators

  • mpalicki