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:
authorThomas Steur <thomas.steur@googlemail.com>2014-11-10 02:17:55 +0300
committerThomas Steur <thomas.steur@googlemail.com>2014-11-10 02:17:55 +0300
commit21ec2facac27f77e398679c456f3479cb9a7de12 (patch)
tree95c596ba1cb746c3b8af9bc2a66501dd250da30c /bower.json
parent3e81595c532781306e2b95b3abbbdae47b44bb71 (diff)
refs #6545 do not request live information in case tab is not active
At first I used the window.blur/focus events but noticed it would also stop refreshing if tab is active but browser window is not active. I reckon many people might want to leave the browser open in one window and follow the live visitors while working on something else. That's why we should use the page visibility API which is supported by most browsers (I think not in <= IE9). I used a different library first but noticed it adds many event listeners like mousemove etc and it can make Piwik slow so used the visibility.js library in the end. If someone uses an old browser nothing will change compared to before so that should be ok. In a next version we could initiate a refresh immediately once the browser tab becomes active again.
Diffstat (limited to 'bower.json')
-rw-r--r--bower.json3
1 files changed, 2 insertions, 1 deletions
diff --git a/bower.json b/bower.json
index d764f63f10..83167eba59 100644
--- a/bower.json
+++ b/bower.json
@@ -28,7 +28,8 @@
"jquery-mousewheel": "~3.1.12",
"jquery-placeholder": "~2.0.8",
"jquery.scrollTo": "~1.4.13",
- "chroma-js": "~0.6.0"
+ "chroma-js": "~0.6.0",
+ "visibilityjs": "~1.2.1"
},
"license": "GPLv3 or later",
"ignore": [