Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated min

  • Loading branch information...
commit 1a4c25f5dd7017293af549230b2ee439272a9495 1 parent bb496df
scottjehl authored
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(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);
+(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var x=e.document,t=x.documentElement,i=t.firstChild,g=x.body||x.createElement("body"),j=[],l=[],r=[],p={},h=30,f=x.getElementsByTagName("head")[0]||t,b=f.getElementsByTagName("link"),d=[],a=function(){var E=b,z=E.length,C=0,B,A,D,y;for(;C<z;C++){B=E[C],A=B.href,D=B.media,y=B.rel&&B.rel.toLowerCase()==="stylesheet";if(!!A&&y&&!p[A]){if(B.styleSheet&&B.styleSheet.rawCssText){n(B.styleSheet.rawCssText,A,D);p[A]=true}else{if(!/^([a-zA-Z]+?:(\/\/)?)/.test(A)||A.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:A,media:D})}}}}v()},v=function(){if(d.length){var y=d.shift();o(y.href,function(z){n(z,y.href,y.media);p[y.href]=true;v()})}},n=function(J,y,A){var H=J.match(/@media[^\{]+\{([^\{\}]+\{[^\}\{]+\})+/gi),K=H&&H.length||0,y=y.substring(0,y.lastIndexOf("/")),z=function(L){return L.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+y+"$2$3")},B=!K&&A,E=0,D,F,G,C,I;if(y.length){y+="/"}if(B){K=1}for(;E<K;E++){D=0;if(B){F=A;l.push(z(J))}else{F=H[E].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;l.push(RegExp.$2&&z(RegExp.$2))}C=F.split(",");I=C.length;for(;D<I;D++){G=C[D];j.push({media:G.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:l.length-1,minw:G.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:G.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}k()},m,s,w=function(){var A,B=x.createElement("div"),y=x.body,z=false;B.style.cssText="position:absolute;font-size:1em;width:1em";if(!y){y=z=g}y.appendChild(B);t.insertBefore(y,t.firstChild);A=B.offsetWidth;if(z){t.removeChild(y)}else{y.removeChild(B)}A=q=parseFloat(A);return A},q,k=function(H){var y="clientWidth",A=t[y],G=x.compatMode==="CSS1Compat"&&A||x.body[y]||A,C={},F=b[b.length-1],z=(new Date()).getTime();if(H&&m&&z-m<h){clearTimeout(s);s=setTimeout(k,h);return}else{m=z}for(var D in j){var J=j[D],B=J.minw,I=J.maxw;if(!!B){B=parseFloat(B)*(/em/i.test(B)?(q||w()):1)}if(!!I){I=parseFloat(I)*(/em/i.test(I)?(q||w()):1)}if(!B&&!I||(!B||B&&G>=B)&&(!I||I&&G<=I)){if(!C[J.media]){C[J.media]=[]}C[J.media].push(l[J.rules])}}for(var D in r){if(r[D]&&r[D].parentNode===f){f.removeChild(r[D])}}for(var D in C){var K=x.createElement("style"),E=C[D].join("\n");K.type="text/css";K.media=D;f.insertBefore(K,F.nextSibling);if(K.styleSheet){K.styleSheet.cssText=E}else{K.appendChild(x.createTextNode(E))}r.push(K)}},o=function(y,A){var z=c();if(!z){return}z.open("GET",y,true);z.onreadystatechange=function(){if(z.readyState!=4||z.status!=200&&z.status!=304){return}A(z.responseText)};if(z.readyState==4){return}z.send(null)},c=(function(){var y=false;try{y=new XMLHttpRequest()}catch(z){y=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return y}})();a();respond.update=a;function u(){k(true)}if(e.addEventListener){e.addEventListener("resize",u,false)}else{if(e.attachEvent){e.attachEvent("onresize",u)}}})(this);
Please sign in to comment.
Something went wrong with that request. Please try again.