From c5da0597bcd0d2bd1daddd3a0f784b8a5e8e1a44 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 13 Oct 2013 23:18:30 -0700 Subject: [PATCH] use CDN for respond.js --- _includes/header.html | 2 +- docs-assets/js/respond.min.js | 6 ------ examples/carousel/index.html | 2 +- examples/grid/index.html | 2 +- examples/jumbotron-narrow/index.html | 2 +- examples/jumbotron/index.html | 2 +- examples/justified-nav/index.html | 2 +- examples/navbar-fixed-top/index.html | 2 +- examples/navbar-static-top/index.html | 2 +- examples/navbar/index.html | 2 +- examples/non-responsive/index.html | 2 +- examples/offcanvas/index.html | 2 +- examples/signin/index.html | 2 +- examples/starter-template/index.html | 2 +- examples/sticky-footer-navbar/index.html | 2 +- examples/sticky-footer/index.html | 2 +- examples/theme/index.html | 2 +- getting-started.html | 2 +- 18 files changed, 17 insertions(+), 23 deletions(-) delete mode 100644 docs-assets/js/respond.min.js diff --git a/_includes/header.html b/_includes/header.html index b25f2cf43a..e70f6a8b68 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -22,7 +22,7 @@ diff --git a/docs-assets/js/respond.min.js b/docs-assets/js/respond.min.js deleted file mode 100644 index e3dc2c0d60..0000000000 --- a/docs-assets/js/respond.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ -/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ -window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='­',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document); - -/*! Respond.js v1.3.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ -(function(a){"use strict";function x(){u(!0)}var b={};if(a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,!b.mediaQueriesSupported){var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var b=m.shift();v(b.href,function(c){p(c,b.href,b.media),h[b.href]=!0,a.setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(b){var h="clientWidth",k=d[h],m="CSS1Compat"===c.compatMode&&k||c.body[h]||k,n={},o=l[l.length-1],p=(new Date).getTime();if(b&&q&&i>p-q)return a.clearTimeout(r),r=a.setTimeout(u,i),void 0;q=p;for(var v in e)if(e.hasOwnProperty(v)){var w=e[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?t||s():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?t||s():1)),w.hasquery&&(z&&A||!(z||m>=x)||!(A||y>=m))||(n[w.media]||(n[w.media]=[]),n[w.media].push(f[w.rules]))}for(var C in g)g.hasOwnProperty(C)&&g[C]&&g[C].parentNode===j&&j.removeChild(g[C]);for(var D in n)if(n.hasOwnProperty(D)){var E=c.createElement("style"),F=n[D].join("\n");E.type="text/css",E.media=D,j.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(c.createTextNode(F)),g.push(E)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)}})(this); diff --git a/examples/carousel/index.html b/examples/carousel/index.html index 7142317128..84c7aa5e68 100644 --- a/examples/carousel/index.html +++ b/examples/carousel/index.html @@ -16,7 +16,7 @@ diff --git a/examples/grid/index.html b/examples/grid/index.html index 419ea02d86..3d34e75ed3 100644 --- a/examples/grid/index.html +++ b/examples/grid/index.html @@ -19,7 +19,7 @@ diff --git a/examples/jumbotron-narrow/index.html b/examples/jumbotron-narrow/index.html index 6c6c10344d..07764ed57d 100644 --- a/examples/jumbotron-narrow/index.html +++ b/examples/jumbotron-narrow/index.html @@ -19,7 +19,7 @@ diff --git a/examples/jumbotron/index.html b/examples/jumbotron/index.html index ea1c76a616..f4a0a667cb 100644 --- a/examples/jumbotron/index.html +++ b/examples/jumbotron/index.html @@ -19,7 +19,7 @@ diff --git a/examples/justified-nav/index.html b/examples/justified-nav/index.html index ac5bb31124..dce853a0d1 100644 --- a/examples/justified-nav/index.html +++ b/examples/justified-nav/index.html @@ -19,7 +19,7 @@ diff --git a/examples/navbar-fixed-top/index.html b/examples/navbar-fixed-top/index.html index 56496db5be..a79bcee9e4 100644 --- a/examples/navbar-fixed-top/index.html +++ b/examples/navbar-fixed-top/index.html @@ -19,7 +19,7 @@ diff --git a/examples/navbar-static-top/index.html b/examples/navbar-static-top/index.html index 864f48e57b..162214897c 100644 --- a/examples/navbar-static-top/index.html +++ b/examples/navbar-static-top/index.html @@ -19,7 +19,7 @@ diff --git a/examples/navbar/index.html b/examples/navbar/index.html index 78ca192152..c3df945a29 100644 --- a/examples/navbar/index.html +++ b/examples/navbar/index.html @@ -19,7 +19,7 @@ diff --git a/examples/non-responsive/index.html b/examples/non-responsive/index.html index 6db2d0bb51..f096462438 100644 --- a/examples/non-responsive/index.html +++ b/examples/non-responsive/index.html @@ -21,7 +21,7 @@ diff --git a/examples/offcanvas/index.html b/examples/offcanvas/index.html index 62ac8ef2b5..b077bf168b 100644 --- a/examples/offcanvas/index.html +++ b/examples/offcanvas/index.html @@ -19,7 +19,7 @@ diff --git a/examples/signin/index.html b/examples/signin/index.html index 46ba71c7ab..9f0631e9f9 100644 --- a/examples/signin/index.html +++ b/examples/signin/index.html @@ -19,7 +19,7 @@ diff --git a/examples/starter-template/index.html b/examples/starter-template/index.html index e6527ccbca..5fd1d0052b 100644 --- a/examples/starter-template/index.html +++ b/examples/starter-template/index.html @@ -19,7 +19,7 @@ diff --git a/examples/sticky-footer-navbar/index.html b/examples/sticky-footer-navbar/index.html index 12a4fb1a24..69fad06044 100644 --- a/examples/sticky-footer-navbar/index.html +++ b/examples/sticky-footer-navbar/index.html @@ -19,7 +19,7 @@ diff --git a/examples/sticky-footer/index.html b/examples/sticky-footer/index.html index c8da90cc9c..ab462cece1 100644 --- a/examples/sticky-footer/index.html +++ b/examples/sticky-footer/index.html @@ -19,7 +19,7 @@ diff --git a/examples/theme/index.html b/examples/theme/index.html index 7cd41b6921..b036cb7518 100644 --- a/examples/theme/index.html +++ b/examples/theme/index.html @@ -21,7 +21,7 @@ diff --git a/getting-started.html b/getting-started.html index b37ad1cfe4..bb81989a4f 100644 --- a/getting-started.html +++ b/getting-started.html @@ -112,7 +112,7 @@ bootstrap/