Skip to content
Browse files

updated min file

  • Loading branch information...
1 parent e4bd0a6 commit eb41b2874a332a3fca5c79d8e3bb546ed269cda9 scottjehl committed Jan 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 respond.min.js
View
2 respond.min.js
@@ -3,4 +3,4 @@
window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.appendChild(g);return function(h){g.innerHTML='&shy;<style media="'+h+'"> #mq-test-1 { width: 42px; }</style>';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document);
/*! Respond.js v1.0.1: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
-(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var t=e.document,q=t.documentElement,h=[],j=[],o=[],n={},g=30,f=t.getElementsByTagName("head")[0]||q,b=f.getElementsByTagName("link"),d=[],a=function(){var A=b,v=A.length,y=0,x,w,z,u;for(;y<v;y++){x=A[y],w=x.href,z=x.media,u=x.rel&&x.rel.toLowerCase()==="stylesheet";if(!!w&&u&&!n[w]){if(x.styleSheet&&x.styleSheet.rawCssText){l(x.styleSheet.rawCssText,w,z);n[w]=true}else{if(!/^([a-zA-Z]+?:(\/\/)?)/.test(w)||w.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:w,media:z})}}}}s()},s=function(){if(d.length){var u=d.shift();m(u.href,function(v){l(v,u.href,u.media);n[u.href]=true;s()})}},l=function(F,u,w){var D=F.match(/@media[^\{]+\{([^\{\}]+\{[^\}\{]+\})+/gi),G=D&&D.length||0,u=u.substring(0,u.lastIndexOf("/")),v=function(H){return H.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+u+"$2$3")},x=!G&&w,A=0,z,B,C,y,E;if(u.length){u+="/"}if(x){G=1}for(;A<G;A++){z=0;if(x){B=w;j.push(v(F))}else{B=D[A].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;j.push(RegExp.$2&&v(RegExp.$2))}y=B.split(",");E=y.length;for(;z<E;z++){C=y[z];h.push({media:C.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:j.length-1,minw:C.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:C.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}}i()},k,p,i=function(C){var u="clientWidth",w=q[u],B=t.compatMode==="CSS1Compat"&&w||t.body[u]||w,x={},A=b[b.length-1],v=(new Date()).getTime();if(C&&k&&v-k<g){clearTimeout(p);p=setTimeout(i,g);return}else{k=v}for(var y in h){var D=h[y];if(!D.minw&&!D.maxw||(!D.minw||D.minw&&B>=D.minw)&&(!D.maxw||D.maxw&&B<=D.maxw)){if(!x[D.media]){x[D.media]=[]}x[D.media].push(j[D.rules])}}for(var y in o){if(o[y]&&o[y].parentNode===f){f.removeChild(o[y])}}for(var y in x){var E=t.createElement("style"),z=x[y].join("\n");E.type="text/css";E.media=y;f.insertBefore(E,A.nextSibling);if(E.styleSheet){E.styleSheet.cssText=z}else{E.appendChild(t.createTextNode(z))}o.push(E)}},m=function(u,w){var v=c();if(!v){return}v.open("GET",u,true);v.onreadystatechange=function(){if(v.readyState!=4||v.status!=200&&v.status!=304){return}w(v.responseText)};if(v.readyState==4){return}v.send(null)},c=(function(){var u=false;try{u=new XMLHttpRequest()}catch(v){u=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return u}})();a();respond.update=a;function r(){i(true)}if(e.addEventListener){e.addEventListener("resize",r,false)}else{if(e.attachEvent){e.attachEvent("onresize",r)}}})(this);
+(function(f){f.respond={};respond.update=function(){};respond.mediaQueriesSupported=f.matchMedia&&f.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=f.document,t=w.documentElement,j=t.firstElementChild||t.firstChild,c=!w.body,h=w.body||w.createElement("body"),k=[],m=[],r=[],q={},i=30,g=w.getElementsByTagName("head")[0]||t,b=g.getElementsByTagName("link"),e=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B<y;B++){A=D[B],z=A.href,C=A.media,x=A.rel&&A.rel.toLowerCase()==="stylesheet";if(!!z&&x&&!q[z]){if(A.styleSheet&&A.styleSheet.rawCssText){o(A.styleSheet.rawCssText,z,C);q[z]=true}else{if(!/^([a-zA-Z]+?:(\/\/)?)/.test(z)||z.replace(RegExp.$1,"").split("/")[0]===f.location.host){e.push({href:z,media:C})}}}}v()},v=function(){if(e.length){var x=e.shift();p(x.href,function(y){o(y,x.href,x.media);q[x.href]=true;v()})}},o=function(I,x,z){var G=I.match(/@media[^\{]+\{([^\{\}]+\{[^\}\{]+\})+/gi),J=G&&G.length||0,x=x.substring(0,x.lastIndexOf("/")),y=function(K){return K.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+x+"$2$3")},A=!J&&z,D=0,C,E,F,B,H;if(x.length){x+="/"}if(A){J=1}for(;D<J;D++){C=0;if(A){E=z;m.push(y(I))}else{E=G[D].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;m.push(RegExp.$2&&y(RegExp.$2))}B=E.split(",");H=B.length;for(;C<H;C++){F=B[C];k.push({media:F.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:m.length-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}l()},n,s,l=function(G){var x="clientWidth",z=t[x],F=w.compatMode==="CSS1Compat"&&z||w.body[x]||z,C={},E=b[b.length-1],y=(new Date()).getTime(),J=(function(){var L;var M=w.createElement("div");M.id="mq-test-1";M.style.cssText="position:absolute;top:-99em;width:1em";h.appendChild(M);if(c){t.insertBefore(h,j)}L=M.offsetWidth;if(c){t.removeChild(h)}h.removeChild(M);return parseFloat(L)})();if(G&&n&&y-n<i){clearTimeout(s);s=setTimeout(l,i);return}else{n=y}for(var B in k){var I=k[B],A=I.minw,H=I.maxw;if(!!A){A=parseFloat(A)*(/em/i.test(A)?J:1)}if(!!H){H=parseFloat(H)*(/em/i.test(H)?J:1)}if(!A&&!H||(!A||A&&F>=A)&&(!H||H&&F<=H)){if(!C[I.media]){C[I.media]=[]}C[I.media].push(m[I.rules])}}for(var B in r){if(r[B]&&r[B].parentNode===g){g.removeChild(r[B])}}for(var B in C){var K=w.createElement("style"),D=C[B].join("\n");K.type="text/css";K.media=B;g.insertBefore(K,E.nextSibling);if(K.styleSheet){K.styleSheet.cssText=D}else{K.appendChild(w.createTextNode(D))}r.push(K)}},p=function(x,z){var y=d();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},d=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function u(){l(true)}if(f.addEventListener){f.addEventListener("resize",u,false)}else{if(f.attachEvent){f.attachEvent("onresize",u)}}})(this);

0 comments on commit eb41b28

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