1window.log = function(){ 2 log.history = log.history || []; 3 log.history.push(arguments); 4 arguments.callee = arguments.callee.caller; 5 if(this.console) console.log( Array.prototype.slice.call(arguments) ); 6}; 7(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{}); 8 9/*global jQuery */ 10/*! 11* FitVids 1.0 12* 13* Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 14* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 15* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 16* 17* Date: Thu Sept 01 18:00:00 2011 -0500 18*/ 19 20(function( $ ){ 21 22 $.fn.fitVids = function( options ) { 23 var settings = { 24 customSelector: null 25 } 26 27 var div = document.createElement('div'), 28 ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0]; 29 30 div.className = 'fit-vids-style'; 31 div.innerHTML = '­<style> \ 32 .fluid-width-video-wrapper { \ 33 width: 100%; \ 34 position: relative; \ 35 padding: 0; \ 36 } \ 37 \ 38 .fluid-width-video-wrapper iframe, \ 39 .fluid-width-video-wrapper object, \ 40 .fluid-width-video-wrapper embed { \ 41 position: absolute; \ 42 top: 0; \ 43 left: 0; \ 44 width: 100%; \ 45 height: 100%; \ 46 } \ 47 </style>'; 48 49 ref.parentNode.insertBefore(div,ref); 50 51 if ( options ) { 52 $.extend( settings, options ); 53 } 54 55 return this.each(function(){ 56 var selectors = [ 57 "iframe[src^='http://player.vimeo.com']", 58 "iframe[src^='http://www.youtube.com']", 59 "iframe[src^='http://www.kickstarter.com']", 60 "object", 61 "embed" 62 ]; 63 64 if (settings.customSelector) { 65 selectors.push(settings.customSelector); 66 } 67 68 var $allVideos = $(this).find(selectors.join(',')); 69 70 $allVideos.each(function(){ 71 var $this = $(this); 72 if (this.tagName.toLowerCase() == 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 73 var height = this.tagName.toLowerCase() == 'object' ? $this.attr('height') : $this.height(), 74 aspectRatio = height / $this.width(); 75 $this.wrap('<div class="fluid-width-video-wrapper" />').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); 76 $this.removeAttr('height').removeAttr('width'); 77 }); 78 }); 79 80 } 81})( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.