Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Upgraded FitVids to latest version.

  • Loading branch information...
commit af0fc063862895d384e8434d8799d52ed73534c4 1 parent 66ef069
Matthias Mees authored

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. +4 4 js/2k11.min.js
8 js/2k11.min.js
@@ -22,11 +22,11 @@ if(!f){return;}function j(){f.setAttribute("content",h);k=true;}function c(){f.s
22 22 n=Math.abs(e.x);m=Math.abs(e.y);l=Math.abs(e.z);if((!d.orientation||d.orientation===180)&&(n>7||((l>6&&m<8||l<8&&m>6)&&n>5))){if(k){c();}}else{if(!k){j();
23 23 }}}d.addEventListener("orientationchange",j,false);d.addEventListener("devicemotion",i,false);})(this);(function(a){a.fn.fitVids=function(b){var c={customSelector:null};
24 24 var e=document.createElement("div"),d=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];e.className="fit-vids-style";
25   -e.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>";
  25 +e.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>";
26 26 d.parentNode.insertBefore(e,d);if(b){a.extend(c,b);}return this.each(function(){var f=["iframe[src*='player.vimeo.com']","iframe[src*='www.youtube.com']","iframe[src*='www.kickstarter.com']","object","embed"];
27   -if(c.customSelector){f.push(c.customSelector);}var g=a(this).find(f.join(","));g.each(function(){var j=a(this);if(this.tagName.toLowerCase()=="embed"&&j.parent("object").length||j.parent(".fluid-width-video-wrapper").length){return;
28   -}var k=this.tagName.toLowerCase()=="object"?j.attr("height"):j.height(),h=k/j.width();if(!j.attr("id")){var i="fitvid"+Math.floor(Math.random()*999999);
29   -j.attr("id",i);}j.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",(h*100)+"%");j.removeAttr("height").removeAttr("width");
  27 +if(c.customSelector){f.push(c.customSelector);}var g=a(this).find(f.join(","));g.each(function(){var l=a(this);if(this.tagName.toLowerCase()=="embed"&&l.parent("object").length||l.parent(".fluid-width-video-wrapper").length){return;
  28 +}var h=(this.tagName.toLowerCase()=="object"||l.attr("height"))?l.attr("height"):l.height(),i=l.attr("width")?l.attr("width"):l.width(),j=h/i;if(!l.attr("id")){var k="fitvid"+Math.floor(Math.random()*999999);
  29 +l.attr("id",k);}l.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",(j*100)+"%");l.removeAttr("height").removeAttr("width");
30 30 });});};})(jQuery);jQuery(function(a){(function(){var b=this;this.hideDetailChildren=function(e){var f=e instanceof jQuery?e[0].childNodes:e.childNodes,g=f.length;
31 31 a(e).attr("open",!1);if(a.browser.safari==!0){for(var m=0;m<g;m++){if(f[m].nodeType==3&&f[m].textContent!=""){var n=a("<span />");n.text(f[m].textContent).hide(),a(f[m]).after(n),f[m].textContent="",g++;
32 32 }}}a.each(f,function(i,k){if(a(k)[0].nodeType==1&&k==a(k).parent().find("> summary:first-of-type")[0]){a(k).data("processed")!=!0&&(a(k).css({display:"block",cursor:"pointer"}).data("processed",!0).addClass("detailHidden").bind("click",function(){b.toggleDetailChildren(a(this));

0 comments on commit af0fc06

Please sign in to comment.
Something went wrong with that request. Please try again.