loadcss-rails 1.2.1 → 1.2.2

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: 4c1df4fb7f764881ee83b8ca481045b406898c8d
4
- data.tar.gz: db5d103e280d2dc1219133358957848429c0d0f7
3
+ metadata.gz: 1a684d78cae8d86a858de8bd942e7a5361e5b791
4
+ data.tar.gz: f38947e516344b4e840c90b16099549fdc046391
5
5
  SHA512:
6
- metadata.gz: cddf44aa37eb099111e6c136834c422654a22179350a11844bbda984f5a85269d0ae0cb08d31446e7813d0dee947e8fae09d8deb639ed426f3e15c460bf23fca
7
- data.tar.gz: 2298157244eaf8c6e7c3b5693fc96ffedaf2f06a8e125926e851a9092f02d63d7f8b6da55ed81875a5e3cd18c19059ad93c6a45936e98d3d667b33678b49f8ed
6
+ metadata.gz: 415843b1f68dd00e416b9e78cad52299f92db02e51b58fc80de8d47713acd708c6d9b6a01dee2dd0a1844589ae50dd40ab36d5ccd67fd85ab849c83a06684fbf
7
+ data.tar.gz: a0161d08c914079f1fc16034b8453b57311bed102f9cb95ec4caae2e3fee4292b96ed3e0e49e417aeb40d080368adb22c8b3f767dae3f335498a96f043e27c0a
data/README.md CHANGED
@@ -27,9 +27,8 @@ The loadCSS and onloadCSS files will be added to the asset pipeline and availabl
27
27
  Here's a quick example of what you would drop in your application's layout (usually `app/views/layouts/application.html.erb`):
28
28
 
29
29
  ```html
30
- <script>
31
- loadCSS("<%= stylesheet_path('application') %>");
32
- </script>
30
+ <link rel="preload" href="<%= stylesheet_path('application') %>" as="style" onload="this.rel='stylesheet'">
31
+ <noscript><link rel="stylesheet" href="<%= stylesheet_path('application') %>"></noscript>
33
32
  ```
34
33
 
35
34
  More examples may be found here: [loadCSS](https://github.com/filamentgroup/loadCSS/)
@@ -1,6 +1,6 @@
1
1
  module LoadCSS
2
2
  module Rails
3
- VERSION = '1.2.1'
3
+ VERSION = '1.2.2'
4
4
  LOADCSS_VERSION = '1.2.1'
5
5
  end
6
6
  end
@@ -31,6 +31,7 @@
31
31
  var run = w.setInterval( rp.poly, 300 );
32
32
  if( w.addEventListener ){
33
33
  w.addEventListener( "load", function(){
34
+ rp.poly();
34
35
  w.clearInterval( run );
35
36
  } );
36
37
  }
@@ -40,7 +40,7 @@
40
40
  ready( function(){
41
41
  ref.parentNode.insertBefore( ss, ( before ? ref : ref.nextSibling ) );
42
42
  });
43
- // A method (exposed on return object for external use) that mimics onload by polling until document.styleSheets until it includes the new sheet.
43
+ // A method (exposed on return object for external use) that mimics onload by polling document.styleSheets until it includes the new sheet.
44
44
  var onloadcssdefined = function( cb ){
45
45
  var resolvedHref = ss.href;
46
46
  var i = sheets.length;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loadcss-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Misshore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-16 00:00:00.000000000 Z
11
+ date: 2017-01-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem provides LoadCSS and OnloadCSS for your Rails application.
14
14
  email:
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  version: '0'
53
53
  requirements: []
54
54
  rubyforge_project:
55
- rubygems_version: 2.4.8
55
+ rubygems_version: 2.5.1
56
56
  signing_key:
57
57
  specification_version: 4
58
58
  summary: Use LoadCSS and OnloadCSS with Rails