PluginProbe ʕ •ᴥ•ʔ
Matomo Analytics – Powerful, Privacy-First Insights for WordPress / 4.13.2
Matomo Analytics – Powerful, Privacy-First Insights for WordPress v4.13.2
5.11.1 5.11.0 5.10.2 5.10.1 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.3.2 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.1.3 4.10.0 4.11.0 4.12.0 4.13.0 4.13.2 4.13.3 4.13.4 4.13.5 4.14.0 4.14.1 4.14.2 4.15.0 4.15.1 4.15.2 4.15.3 4.2.0 4.3.0 4.3.1 4.4.1 4.4.2 4.5.0 4.6.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.10.0 5.2.0 5.2.1 5.2.2 5.3.0 5.3.1 5.3.2 5.3.3 5.6.0 5.6.1 5.7.0 5.7.1 5.8.0 5.8.1 5.8.2
matomo / app / node_modules / visibilityjs / lib / visibility.fallback.js
matomo / app / node_modules / visibilityjs / lib Last commit date
visibility.core.js 3 years ago visibility.fallback.js 3 years ago visibility.js 3 years ago visibility.timers.js 3 years ago
visibility.fallback.js
54 lines
1 // Add Page Visibility API support to old browsers by focus/blur hack.
2 //
3 // Include this script _before_ Visibility.js.
4 //
5 // Note, that this hack doesn’t correctly emulate Page Visibility API:
6 // when user change focus from browser to another window (browser and your
7 // page may stay visible), this hack will decide, that you page is hidden.
8 //
9 // For Firefox 5–9 it will be better to use MozVisibility hack without
10 // this issue. See <https://github.com/private-face/mozvisibility>.
11 ;(function (document) {
12 if ( document.visibilityState || document.webkitVisibilityState ) {
13 return;
14 }
15
16 document.hidden = false;
17 document.visibilityState = 'visible';
18
19 var event = null
20 var i = 0
21 var fireEvent = function () {
22 if( document.createEvent ) {
23 if ( !event ) {
24 event = document.createEvent('HTMLEvents');
25 event.initEvent('visibilitychange', true, true);
26 }
27 document.dispatchEvent(event);
28 } else {
29 if ( typeof(Visibility) == 'object' ) {
30 Visibility._change.call(Visibility, { });
31 }
32 }
33 }
34
35 var onFocus = function () {
36 document.hidden = false;
37 document.visibilityState = 'visible';
38 fireEvent();
39 };
40 var onBlur = function () {
41 document.hidden = true;
42 document.visibilityState = 'hidden';
43 fireEvent();
44 }
45
46 if ( document.addEventListener ) {
47 window.addEventListener('focus', onFocus, true);
48 window.addEventListener('blur', onBlur, true);
49 } else {
50 document.attachEvent('onfocusin', onFocus);
51 document.attachEvent('onfocusout', onBlur);
52 }
53 })(document);
54