jquery-visibility
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -12,15 +12,29 @@ /*! | ||
*/ | ||
;(function(window, document, $, undefined) { | ||
;(function (root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
// AMD. Register as an anonymous module. | ||
define(['jquery'], function ($) { | ||
return factory(root, $); | ||
}); | ||
} else if (typeof exports === 'object') { | ||
// Node/CommonJS | ||
module.exports = factory(root, require('jquery')); | ||
} else { | ||
// Browser globals | ||
factory(root, jQuery); | ||
} | ||
}(this, function(window, $, undefined) { | ||
"use strict"; | ||
var | ||
document = window.document, | ||
property, // property name of document, that stores page visibility | ||
vendorPrefixes = ['webkit', 'o', 'ms', 'moz', ''], | ||
$support = $.support || {}, | ||
// In Opera, `'onfocusin' in document == true`, hence the extra `hasFocus` check to detect IE-like behavior | ||
eventName = 'onfocusin' in document && 'hasFocus' in document ? | ||
'focusin focusout' : | ||
'focus blur'; | ||
var prefix; | ||
var property; | ||
// In Opera, `'onfocusin' in document == true`, hence the extra `hasFocus` check to detect IE-like behavior | ||
var eventName = 'onfocusin' in document && 'hasFocus' in document ? | ||
'focusin focusout' : | ||
'focus blur'; | ||
var prefixes = ['webkit', 'o', 'ms', 'moz', '']; | ||
var $support = $.support; | ||
var $event = $.event; | ||
while ((prefix = prefixes.pop()) !== undefined) { | ||
@@ -66,3 +80,3 @@ property = (prefix ? prefix + 'H': 'h') + 'idden'; | ||
) { | ||
$event.trigger( | ||
$(document).triggerHandler( | ||
property && document[property] || /^(?:blur|focusout)$/.test(type) ? | ||
@@ -76,3 +90,2 @@ 'hide' : | ||
}); | ||
}(this, document, jQuery)); | ||
})); |
/*! jquery-visibility v1.0.8 | MIT license | http://mths.be/visibility */ | ||
!function(i,t,e,o){"use strict";function n(){"hidden"!==u&&(t.hidden=f.pageVisibility?t[u]:o)}for(var s,u,r=("onfocusin"in t&&"hasFocus"in t?"focusin focusout":"focus blur"),c=["webkit","o","ms","moz",""],f=e.support,a=e.event;(s=c.pop())!==o;)if(u=(s?s+"H":"h")+"idden",f.pageVisibility=t[u]!==o,f.pageVisibility){r=s+"visibilitychange";break}n(),e(/blur$/.test(r)?i:t).on(r,function(i){var e=i.type,s=i.originalEvent;if(s){var r=s.toElement;(!/^focus./.test(e)||r===o&&s.fromElement===o&&s.relatedTarget===o)&&a.trigger(u&&t[u]||/^(?:blur|focusout)$/.test(e)?"hide":"show"),n()}})}(this,document,jQuery); | ||
!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.8", | ||
"version": "1.0.9", | ||
"description": "Page visibility shim for jQuery.", | ||
@@ -34,2 +34,5 @@ "keywords": [ | ||
}, | ||
"dependencies": { | ||
"jquery": "*" | ||
}, | ||
"devDependencies": { | ||
@@ -36,0 +39,0 @@ "gulp": "^3.8.11", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7178
81
1
2
2
+ Addedjquery@*
+ Addedjquery@3.7.1(transitive)