<commit_before>*** ifvisible.js

Crosbrowser way to check if user is looking at the page or interacting with it.

Here are few examples:

```javascript

ifvisible.on("blur", function(){
	// example code here..
	animations.pause();
});

ifvisible.on("focus", function(){
	animations.resume();
});

```

ifvisible.js can handle visible states too such as being IDLE or ACTIVE on the page

```javascript

ifvisible.on("idle", function(){
	// Stop auto updating the live data
	stream.pause();
});

ifvisible.on("wakeup", function(){

	stream.resume();
});

```


You can set your smart intervals with ifvisible.js, if user is IDLE or not seeing the action it interval will automatically stop itself

```javascript

// If page is visible run this function on every half seconds
ifvisible.onEvery(0.5, function(){
    <commit_msg>more README<commit_after>ifvisible.js
------------

Crosbrowser way to check if user is looking at the page or interacting with it.

Here are few examples:


```javascript

// If page is visible right now
if( ifvisible.now() ){
	// Display pop-up
	openPopUp();
}

```

Handle tba switch or browser minimize states

```javascript

ifvisible.on("blur", function(){
	// example code here..
	animations.pause();
});

ifvisible.on("focus", function(){
	// resume all animations
	animations.resume();
});

```

ifvisible.js can handle visible states too such as being IDLE or ACTIVE on the page

```javascript

ifvisible.on("idle", function(){
	// Stop auto updating the live data
	stream.pause();
});

ifvisible.on("wakeup", function(){
	// go back updating data
	stream.resume();
});

```

You can set your smart intervals with ifvisible.js, if user is IDLE or not seeing the action it interval will automatically stop itself

```javascript

// If page is visible run this function on every half seconds
ifvisible.onEvery(0.5, function(){
    // Do an animation on the logo only when page is visible
{'fraction_non_alphanumeric': 0.12506513809275666, 'fraction_numerical': 0.0020844189682126106, 'mean_word_length': 4.013054830287206, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2690575', 'n_tokens_mistral': 567, 'n_tokens_neox': 554, 'n_words': 229}