From 53b33f2d4a261c6415a6157e8a94ae85ca029731 Mon Sep 17 00:00:00 2001 From: Fabian Becker Date: Sat, 1 Mar 2014 03:51:08 +0100 Subject: [PATCH] Update jquery.fitvids.js to 1.1 fixes #80 --- assets/js/jquery.fitvids.js | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) mode change 100755 => 100644 assets/js/jquery.fitvids.js diff --git a/assets/js/jquery.fitvids.js b/assets/js/jquery.fitvids.js old mode 100755 new mode 100644 index a8551f6..b9b8d5d --- a/assets/js/jquery.fitvids.js +++ b/assets/js/jquery.fitvids.js @@ -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 = '­'; - - 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 = '

x

'; + head.appendChild(div.childNodes[1]); } if ( options ) {