fitvids-rails 1.0.0 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c2cbd49f1d40fcecc675a31f0d93e50274e510d
4
- data.tar.gz: 2ca1e2ff2ea826c338d179991a2723d1c4073eea
3
+ metadata.gz: 5459fe1baa65499a1cb48c63c208530a6347095c
4
+ data.tar.gz: 59f252b59279b8ee801c18080a102ff235efcb5b
5
5
  SHA512:
6
- metadata.gz: 9ab3358a3116b17766ef0a11086a94079680e71294f30c703c0d21c57054ce8aa15e49a325f1cfc8870b6ae6b79329b18ff8f34a572eca56def9884d95635b1b
7
- data.tar.gz: f51d0a74c95e9bb28ef072166184fdb065fe920eab0586fe52691fd9a937d4263cc80b1c116a058682346bd90433b46be75e70b24b40b59a596585618b08d786
6
+ metadata.gz: 1a36505f22f0a5fc122967483747429c47d175a3f4cd8d30ec3d4f1b4899e8eefdfdacae697e2af46d1274cf45155ffddf421deb9478d2201efee19b765173e4
7
+ data.tar.gz: 85f2e5f72095f9455cccbd540d21e19c82712e4e662cb62fd163f2fca0c523177b97c6bc22b8dc0ab8e778031028683a8500894599cd0d11f73f107d73047c0a
@@ -1,5 +1,5 @@
1
1
  module Fitvids
2
2
  module Rails
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.3'
4
4
  end
5
5
  end
@@ -1,9 +1,9 @@
1
1
  /*global jQuery */
2
2
  /*jshint multistr:true browser:true */
3
3
  /*!
4
- * FitVids 1.0
4
+ * FitVids 1.0.3
5
5
  *
6
- * Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
6
+ * Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
7
7
  * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
8
8
  * Released under the WTFPL license - http://sam.zoy.org/wtfpl/
9
9
  *
@@ -19,29 +19,20 @@
19
19
  customSelector: null
20
20
  };
21
21
 
22
- var div = document.createElement('div'),
23
- ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0];
22
+ if(!document.getElementById('fit-vids-style')) {
24
23
 
25
- div.className = 'fit-vids-style';
26
- div.innerHTML = '&shy;<style> \
27
- .fluid-width-video-wrapper { \
28
- width: 100%; \
29
- position: relative; \
30
- padding: 0; \
31
- } \
32
- \
33
- .fluid-width-video-wrapper iframe, \
34
- .fluid-width-video-wrapper object, \
35
- .fluid-width-video-wrapper embed { \
36
- position: absolute; \
37
- top: 0; \
38
- left: 0; \
39
- width: 100%; \
40
- height: 100%; \
41
- } \
42
- </style>';
24
+ var div = document.createElement('div'),
25
+ ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0],
26
+ cssStyles = '&shy;<style>.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>';
43
27
 
44
- ref.parentNode.insertBefore(div,ref);
28
+ div.className = 'fit-vids-style';
29
+ div.id = 'fit-vids-style';
30
+ div.style.display = 'none';
31
+ div.innerHTML = cssStyles;
32
+
33
+ ref.parentNode.insertBefore(div,ref);
34
+
35
+ }
45
36
 
46
37
  if ( options ) {
47
38
  $.extend( settings, options );
@@ -50,9 +41,9 @@
50
41
  return this.each(function(){
51
42
  var selectors = [
52
43
  "iframe[src*='player.vimeo.com']",
53
- "iframe[src*='www.youtube.com']",
54
- "iframe[src*='www.youtube-nocookie.com']",
55
- "iframe[src*='www.kickstarter.com']",
44
+ "iframe[src*='youtube.com']",
45
+ "iframe[src*='youtube-nocookie.com']",
46
+ "iframe[src*='kickstarter.com'][src*='video.html']",
56
47
  "object",
57
48
  "embed"
58
49
  ];
@@ -62,6 +53,7 @@
62
53
  }
63
54
 
64
55
  var $allVideos = $(this).find(selectors.join(','));
56
+ $allVideos = $allVideos.not("object object"); // SwfObj conflict patch
65
57
 
66
58
  $allVideos.each(function(){
67
59
  var $this = $(this);
@@ -78,4 +70,5 @@
78
70
  });
79
71
  });
80
72
  };
81
- })( jQuery );
73
+ // Works with either jQuery or Zepto
74
+ })( window.jQuery || window.Zepto );
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fitvids-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Thompson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-12 00:00:00.000000000 Z
11
+ date: 2013-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  version: '0'
62
62
  requirements: []
63
63
  rubyforge_project:
64
- rubygems_version: 2.0.0
64
+ rubygems_version: 2.0.5
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: Rails wrapper for fitvids.js