Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jquery-visibility

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery-visibility - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

4

jquery-visibility.js
/*!
* jquery-visibility v1.0.8
* jquery-visibility v1.0.10
* Page visibility shim for jQuery.

@@ -7,3 +7,3 @@ *

*
* @version 1.0.8
* @version 1.0.10
* @license MIT.

@@ -10,0 +10,0 @@ * @author Mathias Bynens - @mathias

@@ -1,2 +0,2 @@

/*! jquery-visibility v1.0.8 | MIT license | http://mths.be/visibility */
/*! jquery-visibility v1.0.10 | MIT license | http://mths.be/visibility */
!function(e,i){"function"==typeof define&&define.amd?define(["jquery"],function(t){return i(e,t)}):"object"==typeof exports?module.exports=i(e,require("jquery")):i(e,jQuery)}(this,function(e,i,t){"use strict";function n(){"hidden"!==o&&(u.hidden=s.pageVisibility?u[o]:t)}for(var o,r,u=e.document,s=i.support||{},f=("onfocusin"in u&&"hasFocus"in u?"focusin focusout":"focus blur");(r=prefixes.pop())!==t;)if(o=(r?r+"H":"h")+"idden",s.pageVisibility=u[o]!==t,s.pageVisibility){f=r+"visibilitychange";break}n(),i(/blur$/.test(f)?e:u).on(f,function(e){var r=e.type,s=e.originalEvent;if(s){var f=s.toElement;(!/^focus./.test(r)||f===t&&s.fromElement===t&&s.relatedTarget===t)&&i(u).triggerHandler(o&&u[o]||/^(?:blur|focusout)$/.test(r)?"hide":"show"),n()}})});
{
"name": "jquery-visibility",
"version": "1.0.9",
"version": "1.0.10",
"description": "Page visibility shim for jQuery.",

@@ -14,3 +14,3 @@ "keywords": [

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "echo \"Error: no test specified.\" && exit 1",
"start": "open demo.html"

@@ -17,0 +17,0 @@ },

@@ -13,7 +13,7 @@ # Page Visibility shim for jQuery

Example use cases include but are not limited to pausing/resuming slideshows, video, and/or embedded audio clips.
Typical use cases include but are not limited to pausing/resuming slideshows, video, and/or embedded audio clips.
## Example usage
This plugin simply provides two custom events for you to use: `show` and `hide`. When the page visibility state changes, the appropriate event will be triggered.
This plugin simply provides two custom document events for you to use: `show` and `hide`. When the page visibility state changes, the appropriate event will be triggered.

@@ -34,3 +34,3 @@ You can use them separately:

Since most of the time you’ll need both events, your best option is to use an events map. This way, you can bind both event handlers in one go:
For most applications you'll need both events, so the most convenient option is to use an events map. This way, you can bind both event handlers in one go:

@@ -56,3 +56,4 @@ ```js

The plugin will detect if the Page Visibility API is natively supported in the browser or not, and expose this information as a boolean (`true`/`false`) in `$.support.pageVisibility`:
The plugin will detect if the Page Visibility API is natively supported in the browser or not, and expose this information as a boolean (`true`/`false`) in `$.support.pageVisibility`.
__Warning:__ `$.support` was marked deprecated in jQuery version 1.9, so it is likely to be removed in the future.

@@ -65,3 +66,3 @@ ```js

If the Page Visibility API is supported the plugin will also store the current visibility state in `document.hidden`
If the Page Visibility API is supported the plugin will also store the current visibility state in `document.hidden`.

@@ -80,3 +81,3 @@ ```js

This plugin is available under the MIT license.
This plugin is available under the [MIT license](http://opensource.org/licenses/MIT).

@@ -89,3 +90,3 @@ ## Author

[John-David Dalton](http://allyoucanleet.com/)
[Jan Paepke](http://github.com/janpaepke)
[Jan Paepke](http://github.com/janpaepke),
[John-David Dalton](http://allyoucanleet.com/)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc