aboutsummaryrefslogtreecommitdiffstats
path: root/interface/js/lib/visibility.min.js
diff options
context:
space:
mode:
authormoisseev <moiseev@mezonplus.ru>2019-08-22 20:10:30 +0300
committermoisseev <moiseev@mezonplus.ru>2019-08-22 20:58:40 +0300
commit7c238dafe98363362eabc45d45c63ed4fefd81ca (patch)
treeb53fd887fed6bad6d8027714f080fde60f7b2e18 /interface/js/lib/visibility.min.js
parentbbed3920bc9e93523618a7780295120ffe76c37f (diff)
downloadrspamd-7c238dafe98363362eabc45d45c63ed4fefd81ca.tar.gz
rspamd-7c238dafe98363362eabc45d45c63ed4fefd81ca.zip
[Minor] Update JavaScript libraries
Diffstat (limited to 'interface/js/lib/visibility.min.js')
-rw-r--r--interface/js/lib/visibility.min.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/interface/js/lib/visibility.min.js b/interface/js/lib/visibility.min.js
index 08b1cfe5f..d3cec484e 100644
--- a/interface/js/lib/visibility.min.js
+++ b/interface/js/lib/visibility.min.js
@@ -1,5 +1,5 @@
/*
- * Visibility.js 1.2.4 (https://github.com/ai/visibilityjs)
+ * Visibility.js 2.0.2 (https://github.com/ai/visibilityjs)
* Copyright (c) 2011, Andrey Sitnik, MIT
*/
-!function(e){"use strict";var i=-1,t={onVisible:function(e){var i=t.isSupported();if(!i||!t.hidden())return e(),i;var n=t.change(function(i,r){t.hidden()||(t.unbind(n),e())});return n},change:function(e){if(!t.isSupported())return!1;i+=1;var n=i;return t._callbacks[n]=e,t._listen(),n},unbind:function(e){delete t._callbacks[e]},afterPrerendering:function(e){var i=t.isSupported(),n="prerender";if(!i||n!=t.state())return e(),i;var r=t.change(function(i,d){n!=d&&(t.unbind(r),e())});return r},hidden:function(){return!(!t._doc.hidden&&!t._doc.webkitHidden)},state:function(){return t._doc.visibilityState||t._doc.webkitVisibilityState||"visible"},isSupported:function(){return!(!t._doc.visibilityState&&!t._doc.webkitVisibilityState)},_doc:document||{},_callbacks:{},_change:function(e){var i=t.state();for(var n in t._callbacks)t._callbacks[n].call(t._doc,e,i)},_listen:function(){if(!t._init){var e="visibilitychange";t._doc.webkitVisibilityState&&(e="webkit"+e);var i=function(){t._change.apply(t,arguments)};t._doc.addEventListener?t._doc.addEventListener(e,i):t._doc.attachEvent(e,i),t._init=!0}}};"undefined"!=typeof module&&module.exports?module.exports=t:e.Visibility=t}(this),function(e){"use strict";var i=-1,t=function(t){return t.every=function(e,n,r){t._time(),r||(r=n,n=null),i+=1;var d=i;return t._timers[d]={visible:e,hidden:n,callback:r},t._run(d,!1),t.isSupported()&&t._listen(),d},t.stop=function(e){return!!t._timers[e]&&(t._stop(e),delete t._timers[e],!0)},t._timers={},t._time=function(){t._timed||(t._timed=!0,t._wasHidden=t.hidden(),t.change(function(){t._stopRun(),t._wasHidden=t.hidden()}))},t._run=function(i,n){var r,d=t._timers[i];if(t.hidden()){if(null===d.hidden)return;r=d.hidden}else r=d.visible;var a=function(){d.last=new Date,d.callback.call(e)};if(n){var o=new Date,c=o-d.last;r>c?d.delay=setTimeout(function(){d.id=setInterval(a,r),a()},r-c):(d.id=setInterval(a,r),a())}else d.id=setInterval(a,r)},t._stop=function(e){var i=t._timers[e];clearInterval(i.id),clearTimeout(i.delay),delete i.id,delete i.delay},t._stopRun=function(e){var i=t.hidden(),n=t._wasHidden;if(i&&!n||!i&&n)for(var r in t._timers)t._stop(r),t._run(r,!i)},t};"undefined"!=typeof module&&module.exports?module.exports=t(require("./visibility.core")):t(e.Visibility)}(window); \ No newline at end of file
+!function(e){var n=-1,r={onVisible:function(n){var e=r.isSupported();if(!e||!r.hidden())return n(),e;var t=r.change(function(e,i){r.hidden()||(r.unbind(t),n())});return t},change:function(e){if(!r.isSupported())return!1;var i=n+=1;return r._callbacks[i]=e,r._listen(),i},unbind:function(e){delete r._callbacks[e]},afterPrerendering:function(n){var e=r.isSupported(),t="prerender";if(!e||t!=r.state())return n(),e;var d=r.change(function(e,i){t!=i&&(r.unbind(d),n())});return d},hidden:function(){return!(!r._doc.hidden&&!r._doc.webkitHidden)},state:function(){return r._doc.visibilityState||r._doc.webkitVisibilityState||"visible"},isSupported:function(){return void 0!==r._doc.hidden||void 0!==r._doc.webkitHidden},_doc:document||{},_callbacks:{},_change:function(e){var i=r.state();for(var n in r._callbacks)r._callbacks[n].call(r._doc,e,i)},_listen:function(){if(!r._init){var e="visibilitychange";r._doc.webkitVisibilityState&&(e="webkit"+e);function i(){r._change.apply(r,arguments)}r._doc.addEventListener?r._doc.addEventListener(e,i):r._doc.attachEvent(e,i),r._init=!0}}};"undefined"!=typeof module&&module.exports?module.exports=r:e.Visibility=r}(this),function(a){function e(o){return o.every=function(e,i,n){o._time(),n||(n=i,i=null);var t=d+=1;return o._timers[t]={visible:e,hidden:i,callback:n},o._run(t,!1),o.isSupported()&&o._listen(),t},o.stop=function(e){return!!o._timers[e]&&(o._stop(e),delete o._timers[e],!0)},o._timers={},o._time=function(){o._timed||(o._timed=!0,o._wasHidden=o.hidden(),o.change(function(){o._stopRun(),o._wasHidden=o.hidden()}))},o._run=function(e,i){var n,t=o._timers[e];if(o.hidden()){if(null===t.hidden)return;n=t.hidden}else n=t.visible;function d(){t.last=new Date,t.callback.call(a)}if(i){var r=new Date-t.last;r<n?t.delay=setTimeout(function(){t.id=setInterval(d,n),d()},n-r):(t.id=setInterval(d,n),d())}else t.id=setInterval(d,n)},o._stop=function(e){var i=o._timers[e];clearInterval(i.id),clearTimeout(i.delay),delete i.id,delete i.delay},o._stopRun=function(e){var i=o.hidden(),n=o._wasHidden;if(i&&!n||!i&&n)for(var t in o._timers)o._stop(t),o._run(t,!i)},o}var d=-1;"undefined"!=typeof module&&module.exports?module.exports=e(require("./visibility.core")):e(a.Visibility||require("./visibility.core"))}(window);