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/*jshint browser:true */ 15/*! 16* FitVids 1.1 17* 18* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 19* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 20* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 21* 22*/ 23 24(function( $ ){ 25 26 "use strict"; 27 28 $.fn.fitVids = function( options ) { 29 var settings = { 30 customSelector: null, 31 ignore: null, 32 }; 33 34 if(!document.getElementById('fit-vids-style')) { 35 // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js 36 var head = document.head || document.getElementsByTagName('head')[0]; 37 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%;}'; 38 var div = document.createElement('div'); 39 div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>'; 40 head.appendChild(div.childNodes[1]); 41 } 42 43 if ( options ) { 44 $.extend( settings, options ); 45 } 46 47 return this.each(function(){ 48 var selectors = [ 49 "iframe[src*='player.vimeo.com']", 50 "iframe[src*='youtube.com']", 51 "iframe[src*='youtube-nocookie.com']", 52 "iframe[src*='kickstarter.com'][src*='video.html']", 53 "object", 54 "embed" 55 ]; 56 57 if (settings.customSelector) { 58 selectors.push(settings.customSelector); 59 } 60 61 var ignoreList = '.fitvidsignore'; 62 63 if(settings.ignore) { 64 ignoreList = ignoreList + ', ' + settings.ignore; 65 } 66 67 var $allVideos = $(this).find(selectors.join(',')); 68 $allVideos = $allVideos.not("object object"); // SwfObj conflict patch 69 $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video. 70 71 $allVideos.each(function(){ 72 var $this = $(this); 73 if($this.parents(ignoreList).length > 0) { 74 return; // Disable FitVids on this video. 75 } 76 if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 77 if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width')))) 78 { 79 $this.attr('height', 9); 80 $this.attr('width', 16); 81 } 82 var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(), 83 width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), 84 aspectRatio = height / width; 85 if(!$this.attr('id')){ 86 var videoID = 'fitvid' + Math.floor(Math.random()*999999); 87 $this.attr('id', videoID); 88 } 89 $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); 90 $this.removeAttr('height').removeAttr('width'); 91 }); 92 }); 93 }; 94// Works with either jQuery or Zepto 95})( window.jQuery || window.Zepto ); 96 97 98}
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.