add-to-homescreen-rails 3.1.0 → 3.1.1

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
2
  SHA1:
3
- metadata.gz: 569f945dd07d08286f2175be4beaf7c541b580e2
4
- data.tar.gz: b68e67b306efac6293f635964be2c66b9b6850d4
3
+ metadata.gz: 7ad00cb4ee47fe1150573e06fe44a6ad3b3c7d6f
4
+ data.tar.gz: 9d76ebd19cd2ddf537c90baecc068345301d7e4e
5
5
  SHA512:
6
- metadata.gz: ba659381d1c13bcd165f2b04a99b2fa7f40cbd2d4f98b39fefadc7580ba9156ee205465b1b3b51731ec7bd94f987e13bba2ff27fc3fc7b3873b6d5e504aab916
7
- data.tar.gz: 25131d6ec0ccf7eab4d05dd3b0da075fe83c9d371f759230811b37d518207026cce0d2f37befd96445116f476fbef92d911940d052388a0cb2542069e2d09894
6
+ metadata.gz: a113452bf7f46970f60ae126b6a6e90cbef8bafd7e0d4c1fc4da4bb1cf3471207457c92f36bf335bcd8bbfda6762b9667fc49af7c07040c8139ea07aade55b30
7
+ data.tar.gz: 9cbea52d597cbda034fcc9f11b46dd140f5cb90cf09fa4bc40548aa9ad9605d58324ae498866094a2c531f1e26d63a64dddd3fc7672e06e9ef0aed7e202bf26b
@@ -1,4 +1,4 @@
1
- /* Add to Homescreen v3.1.0 ~ (c) 2014 Matteo Spinelli ~ @license: http://cubiq.org/license */
1
+ /* Add to Homescreen v3.1.1 ~ (c) 2014 Matteo Spinelli ~ @license: http://cubiq.org/license */
2
2
  (function (window, document) {
3
3
  /*
4
4
  _ _ _____ _____
@@ -8,16 +8,14 @@
8
8
  by Matteo Spinelli ~ http://cubiq.org
9
9
  */
10
10
 
11
- // Check for addEventListener browser support (<IE9)
12
- if ( !window.addEventListener ) {
13
- return;
14
- }
11
+ // Check for addEventListener browser support (prevent errors in IE<9)
12
+ var _eventListener = 'addEventListener' in window;
15
13
 
16
14
  // Check if document is loaded, needed by autostart
17
15
  var _DOMReady = false;
18
16
  if ( document.readyState === 'complete' ) {
19
17
  _DOMReady = true;
20
- } else {
18
+ } else if ( _eventListener ) {
21
19
  window.addEventListener('load', loaded, false);
22
20
  }
23
21
 
@@ -184,6 +182,11 @@ ath.Class = function (options) {
184
182
  this.options = _extend({}, ath.defaults);
185
183
  _extend(this.options, options);
186
184
 
185
+ // IE<9 so exit (I hate you, really)
186
+ if ( !_eventListener ) {
187
+ return;
188
+ }
189
+
187
190
  // normalize some options
188
191
  this.options.mandatory = this.options.mandatory && ( 'standalone' in window.navigator || this.options.debug );
189
192
  this.options.modal = this.options.modal || this.options.mandatory;
@@ -2,7 +2,7 @@ module Add
2
2
  module To
3
3
  module Homescreen
4
4
  module Rails
5
- VERSION = "3.1.0"
5
+ VERSION = "3.1.1"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: add-to-homescreen-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - RogerE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-19 00:00:00.000000000 Z
11
+ date: 2014-11-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Provides the 'Add to Home screen' assets for your Rails application.
14
14
  email: