Skip to content

zecar/page-visible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

page-visible

NPM module

Description

This module is based on the Page Visibility API. It shows when a webpage is in focus or hidden.

Install

npm install page-visible

Usage

console.log(PageVisible.visible); // Boolean

PageVisible.on('hidden', function(){
  console.log('Page is not visible anymore!');
});

PageVisible.on('visible', function(){
  console.log('User is back on the page!');
});

Releases

No releases published

Packages

No packages published