visibilityjs 1.2.4 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: de243ac1043eb09b23462dac69cfab08b89ac53a
4
- data.tar.gz: afb78cc909abbdc95185d5c385758fe6c98a9115
2
+ SHA256:
3
+ metadata.gz: 4c53a8cd2dc153ab5f352b958f2f9beacec50eb4c6c2f54d695881f07a32d595
4
+ data.tar.gz: 969b46b300d97867266d7f177b81ebecc0efa15af20151b81d01bdd3d040c08c
5
5
  SHA512:
6
- metadata.gz: 4edb3b804218f87a18cdd4bfc1d64205688f4d4883fad44e3b613b1ede3e975e9836f3e588681b8f1b69e32ba3b399c7069c90a51d2953bdbe241cc405859db4
7
- data.tar.gz: ee4ba45b83f5e19d909d51b136fbdd73a826128f55b118f0f97f838153847da244402b11ab48c8eec0edd6b532af7e7e0cf3b6a45c972c88405b64d01f6a4048
6
+ metadata.gz: 6ee8a80a9f32cb6c24c0918c7d5770427f6f8f834138fcdfcfc5fb8f88c61a02af1e3a9e587d9eb5e74394f9af517750689cd30fcc63b2cff4590f76535229af
7
+ data.tar.gz: 276148ff13be602f18b6d748937ef982161fdcd73f1f7f613ab6fe1b9bd434e757da07136096c6f4d03fb7dd2b3d727f2e8ac9f2f2220c0b6f78c88f11c01c38
@@ -1,17 +1,33 @@
1
- ### 1.2.4 “Luna 3, Dark side of the Moon”
1
+ # Change Log
2
+
3
+ ## 1.2.8 “Pioneer 5, solar wind”
4
+ * Fix TypeScript module declaration by @maciejmrozinski.
5
+ * Fix headless Chrome support by @runspired.
6
+ * Reduce project size.
7
+
8
+ ## 1.2.7 “Discoverer 8, hard”
9
+ * Fix type definitions by @dpoetzsch.
10
+
11
+ ## 1.2.6 “Discoverer 7, powerless”
12
+ * Fix type definitions for TypeScript 2.6 by @marayfirth.
13
+
14
+ ## 1.2.5 “Explorer 7, solar x-ray”
15
+ * Add TypeScript definitions by Joel Hernández.
16
+
17
+ ## 1.2.4 “Luna 3, Dark side of the Moon”
2
18
  * Fix race condition by Mikhail Vazhnov.
3
19
 
4
- ### 1.2.3 “Vanguard 3, 300 years”
20
+ ## 1.2.3 “Vanguard 3, 300 years”
5
21
  * Fix Rails support by @dimko.
6
22
 
7
- ### 1.2.2 “Luna 2, impact”
23
+ ## 1.2.2 “Luna 2, impact”
8
24
  * Fix Sprockets 3 support by Waseem Sadiq.
9
25
  * Add Component support by Mitchel Kelonye.
10
26
 
11
- ### 1.2.1 “Discoverer 6, again”
27
+ ## 1.2.1 “Discoverer 6, again”
12
28
  * Fix Bower config by Misha Ponizil.
13
29
 
14
- ### 1.2.0 “Discoverer 5, spy”
30
+ ## 1.2.0 “Discoverer 5, spy”
15
31
  * Allow to use in CommonJS.
16
32
  * Release npm package.
17
33
  * Reduce library size to 10 %.
data/README.md CHANGED
@@ -28,6 +28,10 @@ hack has an issue: when browser just lose focus but still visible for user, its
28
28
  [prerendering]: http://code.google.com/chrome/whitepapers/prerender.html
29
29
  [natively supported]: http://caniuse.com/pagevisibility
30
30
 
31
+ ## Demo
32
+
33
+ https://ai.github.io/visibilityjs/
34
+
31
35
  ## Translations
32
36
 
33
37
  Документация на русском:
@@ -68,6 +72,11 @@ Visibility.every(minute, 5 * minute, function () {
68
72
  });
69
73
  ```
70
74
 
75
+ When the page becomes visible, if the callback has not been called in longer than
76
+ the visible interval, it will be called immediately. In the example above, if you
77
+ hid the page for 9 minutes, `checkForEmail` will get called once while the page is hidden,
78
+ and immediately when it is made visible.
79
+
71
80
  `Visibility.every` returns a timer identifier, much like the `setInterval`
72
81
  function. However, it cannot be passed to `clearInterval`, and you should use
73
82
  `Visibility.stop(id)` to stop the timer.
@@ -1,6 +1,4 @@
1
1
  ;(function (global) {
2
- "use strict";
3
-
4
2
  var lastId = -1;
5
3
 
6
4
  // Visibility.js allow you to know, that your web page is in the background
@@ -9,10 +9,8 @@
9
9
  // For Firefox 5–9 it will be better to use MozVisibility hack without
10
10
  // this issue. See <https://github.com/private-face/mozvisibility>.
11
11
  ;(function (document) {
12
- "use strict";
13
-
14
12
  if ( document.visibilityState || document.webkitVisibilityState ) {
15
- return;
13
+ return;
16
14
  }
17
15
 
18
16
  document.hidden = false;
@@ -1,6 +1,4 @@
1
1
  ;(function (window) {
2
- "use strict";
3
-
4
2
  var lastTimer = -1;
5
3
 
6
4
  var install = function (Visibility) {
@@ -157,7 +155,7 @@
157
155
  if ( typeof(module) != 'undefined' && module.exports ) {
158
156
  module.exports = install(require('./visibility.core'));
159
157
  } else {
160
- install(window.Visibility)
158
+ install(window.Visibility || require('./visibility.core'))
161
159
  }
162
160
 
163
161
  })(window);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: visibilityjs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Sitnik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-04 00:00:00.000000000 Z
11
+ date: 2018-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  version: '0'
66
66
  requirements: []
67
67
  rubyforge_project:
68
- rubygems_version: 2.5.1
68
+ rubygems_version: 2.7.6
69
69
  signing_key:
70
70
  specification_version: 4
71
71
  summary: Wrapper for the Page Visibility API