Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated FitVids.js to latest version.

  • Loading branch information...
commit b6e36d98150bbfdf5aae18f4f46c31aed5cb5ee7 1 parent d1303b6
@yellowled authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/2k11.min.js
View
4 js/2k11.min.js
@@ -21,8 +21,8 @@ T();respond.update=T;function A(){K(true);}if(P.addEventListener){P.addEventList
}function w(){o.setAttribute("content",y);v=true;}function A(){o.setAttribute("content",r);v=false;}function x(a){z=a.accelerationIncludingGravity;s=Math.abs(z.x);
t=Math.abs(z.y);u=Math.abs(z.z);if(!p.orientation&&(s>7||((u>6&&t<8||u<8&&t>6)&&s>5))){if(v){A();}}else{if(!v){w();}}}p.addEventListener("orientationchange",w,false);
p.addEventListener("devicemotion",x,false);})(this);(function(b){b.fn.fitVids=function(a){var h={customSelector:null};var f=document.createElement("div"),g=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];
-f.className="fit-vids-style";f.innerHTML="&shy;<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>";
-g.parentNode.insertBefore(f,g);if(a){b.extend(h,a);}return this.each(function(){var d=["iframe[src^='http://player.vimeo.com']","iframe[src^='http://www.youtube.com']","iframe[src^='https://www.youtube.com']","iframe[src^='http://www.kickstarter.com']","object","embed"];
+f.className="fit-vids-style";f.innerHTML="&shy;<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>";
+g.parentNode.insertBefore(f,g);if(a){b.extend(h,a);}return this.each(function(){var d=["iframe[src*='player.vimeo.com']","iframe[src*='www.youtube.com']","iframe[src*='www.kickstarter.com']","object","embed"];
if(h.customSelector){d.push(h.customSelector);}var c=b(this).find(d.join(","));c.each(function(){var e=b(this);if(this.tagName.toLowerCase()=="embed"&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length){return;
}var n=this.tagName.toLowerCase()=="object"?e.attr("height"):e.height(),m=n/e.width();if(!e.attr("id")){var l="fitvid"+Math.floor(Math.random()*999999);
e.attr("id",l);}e.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",(m*100)+"%");e.removeAttr("height").removeAttr("width");
Please sign in to comment.
Something went wrong with that request. Please try again.