Skip to content

A simple activity monitor to alert you when the user becomes active or inactive

License

Notifications You must be signed in to change notification settings

coatue-oss/browser-activity-monitor

Repository files navigation

browser-activity-monitor Build Status NPM MIT

A simple activity monitor to alert you when the user becomes active or inactive

Installation

npm install browser-activity-monitor --save

Usage

import { ActivityMonitor, ACTIVE, INACTIVE } from 'browser-activity-monitor'

const monitor = new ActivityMonitor(document)
monitor.on(ACTIVE, () => console.log('User is active!'))
monitor.on(INACTIVE, () => console.log('User is inactive!'))

// ...
monitor.destroy()

Tests

npm test

License

Apache-2.0

About

A simple activity monitor to alert you when the user becomes active or inactive

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published