1/** 2* Vanilla FitVids v0.1.0 3* Let your videos be fluid. 4* http://github.com/rosszurowski/vanilla-fitvids/ 5* 6* Licensed under the WTFPL license 7*/ 8;(function(e,t){"use strict";e.fitVids=function(e,t){var n=document.querySelectorAll(e);if(!n)return;var r={customSelector:null};var i=document.createElement("div"),s=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];i.className="fit-vids-style";i.innerHTML="Â<style> .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%; } </style>";s.parentNode.insertBefore(i,s);if(t)r=JSON.parse(JSON.stringify(t));var o=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com']","object","embed"];if(r.customSelector)o.push(r.customSelector);var u=[];for(var a=0;a<n.length;a++){var f=n[a],l=f.querySelectorAll(o.join(","));if(l.length>0){for(var c=0;c<l.length;c++){u.push(l[c])}}}for(var a=0;a<u.length;a++){var f=u[a];if(f.tagName.toLowerCase()==="embed"&&f.parentNode.tagName==="object"||/fluid-width-video-wrapper/.test(f.parentNode.className)){return}var h=f.tagName.toLowerCase()==="object"||f.getAttribute("height")&&!isNaN(parseInt(f.getAttribute("height"),10))?parseInt(f.getAttribute("height"),10):f.clientHeight,p=!isNaN(parseInt(f.getAttribute("width"),10))?parseInt(f.getAttribute("width"),10):f.clientWidth,d=h/p;if(!f.getAttribute("id")){var v="fitvid"+Math.floor(Math.random()*999999);f.setAttribute("id",v)}f.removeAttribute("height");f.removeAttribute("width");var m=document.createElement("div");m.className="fluid-width-video-wrapper";m.appendChild(f.cloneNode(true));f.parentNode.replaceChild(m,f);m.style.paddingTop=""+d*100+"%"}}})(window)
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.