1var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; 2if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } 3{ 4 let window = _____WB$wombat$assign$function_____("window"); 5 let self = _____WB$wombat$assign$function_____("self"); 6 let document = _____WB$wombat$assign$function_____("document"); 7 let location = _____WB$wombat$assign$function_____("location"); 8 let top = _____WB$wombat$assign$function_____("top"); 9 let parent = _____WB$wombat$assign$function_____("parent"); 10 let frames = _____WB$wombat$assign$function_____("frames"); 11 let opener = _____WB$wombat$assign$function_____("opener"); 12 13/*global jQuery */ 14/*! 15* FitVids 1.0 16* 17* Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 18* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 19* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 20* 21* Date: Thu Sept 01 18:00:00 2011 -0500 22*/ 23(function( $ ){ 24 $.fn.fitVids = function( options ) { 25 var settings = { 26 customSelector: null 27 } 28 var div = document.createElement('div'), 29 ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0]; 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 ref.parentNode.insertBefore(div,ref); 49 if ( options ) { 50 $.extend( settings, options ); 51 } 52 return this.each(function(){ 53 var selectors = [ 54 "iframe[src*='player.vimeo.com']", 55 "iframe[src*='www.youtube.com']", 56 "iframe[src*='www.kickstarter.com']", 57 "object", 58 "embed" 59 ]; 60 if (settings.customSelector) { 61 selectors.push(settings.customSelector); 62 } 63 var $allVideos = $(this).find(selectors.join(',')); 64 $allVideos.each(function(){ 65 var $this = $(this); 66 if (this.tagName.toLowerCase() == 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 67 var height = this.tagName.toLowerCase() == 'object' ? $this.attr('height') : $this.height(), 68 aspectRatio = height / $this.width(); 69 if(!$this.attr('id')){ 70 var videoID = 'fitvid' + Math.floor(Math.random()*999999); 71 $this.attr('id', videoID); 72 } 73 $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); 74 $this.removeAttr('height').removeAttr('width'); 75 }); 76 }); 77 } 78})( jQuery ); 79 80}
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.