1.0.1 • Published 3 years ago

js-screensaver v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

JS Screensaver

Simple library to run screensaver on your website.

Run screensaver without any configuration:

JsScreensaver.start({});

This will run the predefined screensaver with basic message and styling. It's possible to extend the basic screensaver with the following options which have to be put in the object.

  • text - insert your message inside the default screensaver,
  • background - change the background color the default screensaver,
  • baseElement - by default, screensaver is embeded into body but you can choose any DOM element from your page to insert the screensaver there.
  • animationSpeed - choose the animation speed. There are 3 options - slow, regular, fast. Default value is set to regular.
  • customElement - replace the default screensaver element with your custom element. You can put Node Element or raw HTML in string.
  • triggerTime - the time in miliseconds after which screensaver will be launched.
1.0.1

3 years ago

1.0.0

3 years ago