Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libs/bower_components/visibilityjs/lib/visibility.fallback.js')
-rw-r--r--libs/bower_components/visibilityjs/lib/visibility.fallback.js55
1 files changed, 0 insertions, 55 deletions
diff --git a/libs/bower_components/visibilityjs/lib/visibility.fallback.js b/libs/bower_components/visibilityjs/lib/visibility.fallback.js
deleted file mode 100644
index 4dcca2711d..0000000000
--- a/libs/bower_components/visibilityjs/lib/visibility.fallback.js
+++ /dev/null
@@ -1,55 +0,0 @@
-// Add Page Visibility API support to old browsers by focus/blur hack.
-//
-// Include this script _before_ Visibility.js.
-//
-// Note, that this hack doesn’t correctly emulate Page Visibility API:
-// when user change focus from browser to another window (browser and your
-// page may stay visible), this hack will decide, that you page is hidden.
-//
-// For Firefox 5–9 it will be better to use MozVisibility hack without
-// this issue. See <https://github.com/private-face/mozvisibility>.
-;(function (document) {
- "use strict";
-
- if ( document.visibilityState || document.webkitVisibilityState ) {
- return;
- }
-
- document.hidden = false;
- document.visibilityState = 'visible';
-
- var event = null
- var i = 0
- var fireEvent = function () {
- if( document.createEvent ) {
- if ( !event ) {
- event = document.createEvent('HTMLEvents');
- event.initEvent('visibilitychange', true, true);
- }
- document.dispatchEvent(event);
- } else {
- if ( typeof(Visibility) == 'object' ) {
- Visibility._change.call(Visibility, { });
- }
- }
- }
-
- var onFocus = function () {
- document.hidden = false;
- document.visibilityState = 'visible';
- fireEvent();
- };
- var onBlur = function () {
- document.hidden = true;
- document.visibilityState = 'hidden';
- fireEvent();
- }
-
- if ( document.addEventListener ) {
- window.addEventListener('focus', onFocus, true);
- window.addEventListener('blur', onBlur, true);
- } else {
- document.attachEvent('onfocusin', onFocus);
- document.attachEvent('onfocusout', onBlur);
- }
-})(document);