fitvids-rails 1.0.0 → 1.0.3
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 +4 -4
- data/lib/fitvids-rails/version.rb +1 -1
- data/vendor/assets/javascripts/fitvids.js +20 -27
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5459fe1baa65499a1cb48c63c208530a6347095c
|
4
|
+
data.tar.gz: 59f252b59279b8ee801c18080a102ff235efcb5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a36505f22f0a5fc122967483747429c47d175a3f4cd8d30ec3d4f1b4899e8eefdfdacae697e2af46d1274cf45155ffddf421deb9478d2201efee19b765173e4
|
7
|
+
data.tar.gz: 85f2e5f72095f9455cccbd540d21e19c82712e4e662cb62fd163f2fca0c523177b97c6bc22b8dc0ab8e778031028683a8500894599cd0d11f73f107d73047c0a
|
@@ -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
|
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
|
-
|
23
|
-
ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0];
|
22
|
+
if(!document.getElementById('fit-vids-style')) {
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
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 = '­<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
|
-
|
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*='
|
54
|
-
"iframe[src*='
|
55
|
-
"iframe[src*='
|
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
|
-
|
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.
|
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-
|
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.
|
64
|
+
rubygems_version: 2.0.5
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: Rails wrapper for fitvids.js
|