parent
f39e92a5fd
commit
53b33f2d4a
|
@ -1,13 +1,12 @@
|
|||
/*global jQuery */
|
||||
/*jshint multistr:true browser:true */
|
||||
/*jshint browser:true */
|
||||
/*!
|
||||
* FitVids 1.0.3
|
||||
* FitVids 1.1
|
||||
*
|
||||
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
|
||||
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
|
||||
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
|
||||
*
|
||||
* Date: Thu Sept 01 18:00:00 2011 -0500
|
||||
*/
|
||||
|
||||
(function( $ ){
|
||||
|
@ -20,18 +19,12 @@
|
|||
};
|
||||
|
||||
if(!document.getElementById('fit-vids-style')) {
|
||||
|
||||
var div = document.createElement('div'),
|
||||
ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0],
|
||||
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>';
|
||||
|
||||
div.className = 'fit-vids-style';
|
||||
div.id = 'fit-vids-style';
|
||||
div.style.display = 'none';
|
||||
div.innerHTML = cssStyles;
|
||||
|
||||
ref.parentNode.insertBefore(div,ref);
|
||||
|
||||
// appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
|
||||
var head = document.head || document.getElementsByTagName('head')[0];
|
||||
var css = '.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%;}';
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
|
||||
head.appendChild(div.childNodes[1]);
|
||||
}
|
||||
|
||||
if ( options ) {
|
||||
|
|
Loading…
Reference in New Issue