Skip to content

Latest commit

 

History

History
15 lines (14 loc) · 314 Bytes

readme.md

File metadata and controls

15 lines (14 loc) · 314 Bytes

js screensaver

Do something when there is no interaction ("mousemove", "touchstart") with window.

const mySreensaver = new Screensaver({
  idleTime: 5,
  clearEvents : ['keydown', 'whatEverEvent'],
  onActivation: () => {
    // doWhatever()
  },
  onDeactivation: () => {
    // stopWhatever()
  }
})
```