Revert formatting for external libraries
This commit is contained in:
@@ -32,8 +32,7 @@
|
|||||||
$.extend( settings, options );
|
$.extend( settings, options );
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.each(
|
return this.each(function(){
|
||||||
function(){
|
|
||||||
var selectors = [
|
var selectors = [
|
||||||
'iframe[src*="player.vimeo.com"]',
|
'iframe[src*="player.vimeo.com"]',
|
||||||
'iframe[src*="youtube.com"]',
|
'iframe[src*="youtube.com"]',
|
||||||
@@ -57,15 +56,14 @@
|
|||||||
$allVideos = $allVideos.not('object object'); // SwfObj conflict patch
|
$allVideos = $allVideos.not('object object'); // SwfObj conflict patch
|
||||||
$allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
|
$allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
|
||||||
|
|
||||||
$allVideos.each(
|
$allVideos.each(function(){
|
||||||
function(){
|
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
if($this.parents(ignoreList).length > 0) {
|
if($this.parents(ignoreList).length > 0) {
|
||||||
return; // Disable FitVids on this video.
|
return; // Disable FitVids on this video.
|
||||||
}
|
}
|
||||||
if (this.tagName.toLowerCase() === 'embed' && $this.parent( 'object' ).length || $this.parent( '.fluid-width-video-wrapper' ).length) {
|
if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
|
||||||
return; }
|
if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
|
||||||
if (( ! $this.css( 'height' ) && ! $this.css( 'width' )) && (isNaN( $this.attr( 'height' ) ) || isNaN( $this.attr( 'width' ) ))) {
|
{
|
||||||
$this.attr('height', 9);
|
$this.attr('height', 9);
|
||||||
$this.attr('width', 16);
|
$this.attr('width', 16);
|
||||||
}
|
}
|
||||||
@@ -78,10 +76,8 @@
|
|||||||
}
|
}
|
||||||
$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');
|
$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');
|
||||||
$this.removeAttr('height').removeAttr('width');
|
$this.removeAttr('height').removeAttr('width');
|
||||||
}
|
});
|
||||||
);
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
// Works with either jQuery or Zepto
|
// Works with either jQuery or Zepto
|
||||||
})( window.jQuery || window.Zepto );
|
})( window.jQuery || window.Zepto );
|
||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user