This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/lib/modernizr-2.5.3.min.js

10 lines
No EOL
11 KiB
JavaScript

/*!
* Modernizr v2.5.3
* www.modernizr.com
*
* Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
* Available under the BSD and MIT licenses: www.modernizr.com/license/
*/
window.Modernizr=(function(B,c,h){var K="2.5.3",x={},z=true,N=c.documentElement,a="modernizr",J=c.createElement(a),F=J.style,M=c.createElement("input"),D=":)",b={}.toString,k=" -webkit- -moz- -o- -ms- ".split(" "),i="Webkit Moz O ms",G=i.split(" "),L=i.toLowerCase().split(" "),I={svg:"http://www.w3.org/2000/svg"},m={},q={},g={},e=[],l=e.slice,t,o=function(V,X,Q,W){var P,U,S,O=c.createElement("div"),T=c.body,R=T?T:c.createElement("body");if(parseInt(Q,10)){while(Q--){S=c.createElement("div");S.id=W?W[Q]:a+(Q+1);O.appendChild(S)}}P=["&#173;","<style>",V,"</style>"].join("");O.id=a;R.innerHTML+=P;R.appendChild(O);if(!T){R.style.background="";N.appendChild(R)}U=X(O,V);!T?R.parentNode.removeChild(R):O.parentNode.removeChild(O);return !!U},H=function(Q){var P=B.matchMedia||B.msMatchMedia;if(P){return P(Q).matches}var O;o("@media "+Q+" { #"+a+" { position: absolute; } }",function(R){O=(B.getComputedStyle?getComputedStyle(R,null):R.currentStyle)["position"]=="absolute"});return O},p=(function(){var P={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function O(Q,S){S=S||c.createElement(P[Q]||"div");Q="on"+Q;var R=Q in S;if(!R){if(!S.setAttribute){S=c.createElement("div")}if(S.setAttribute&&S.removeAttribute){S.setAttribute(Q,"");R=s(S[Q],"function");if(!s(S[Q],"undefined")){S[Q]=h}S.removeAttribute(Q)}}S=null;return R}return O})();var j=({}).hasOwnProperty,f;if(!s(j,"undefined")&&!s(j.call,"undefined")){f=function(O,P){return j.call(O,P)}}else{f=function(O,P){return((P in O)&&s(O.constructor.prototype[P],"undefined"))}}if(!Function.prototype.bind){Function.prototype.bind=function d(Q){var R=this;if(typeof R!="function"){throw new TypeError()}var O=l.call(arguments,1),P=function(){if(this instanceof P){var U=function(){};U.prototype=R.prototype;var T=new U;var S=R.apply(T,O.concat(l.call(arguments)));if(Object(S)===S){return S}return T}else{return R.apply(Q,O.concat(l.call(arguments)))}};return P}}function E(O){F.cssText=O}function v(P,O){return E(k.join(P+";")+(O||""))}function s(P,O){return typeof P===O}function u(P,O){return !!~(""+P).indexOf(O)}function A(Q,O){for(var P in Q){if(F[Q[P]]!==h){return O=="pfx"?Q[P]:true}}return false}function r(P,S,R){for(var O in P){var Q=S[P[O]];if(Q!==h){if(R===false){return P[O]}if(s(Q,"function")){return Q.bind(R||S)}return Q}}return false}function n(S,O,R){var P=S.charAt(0).toUpperCase()+S.substr(1),Q=(S+" "+G.join(P+" ")+P).split(" ");if(s(O,"string")||s(O,"undefined")){return A(Q,O)}else{Q=(S+" "+(L).join(P+" ")+P).split(" ");return r(Q,O,R)}}var y=(function(R,Q){var P=R.join(""),O=Q.length;o(P,function(V,X){var U=c.styleSheets[c.styleSheets.length-1],T=U?(U.cssRules&&U.cssRules[0]?U.cssRules[0].cssText:U.cssText||""):"",S=V.childNodes,W={};while(O--){W[S[O].id]=S[O]}x.touch=("ontouchstart" in B)||B.DocumentTouch&&c instanceof DocumentTouch||(W.touch&&W.touch.offsetTop)===9;x.csstransforms3d=(W.csstransforms3d&&W.csstransforms3d.offsetLeft)===9&&W.csstransforms3d.offsetHeight===3;x.generatedcontent=(W.generatedcontent&&W.generatedcontent.offsetHeight)>=1;x.fontface=/src/i.test(T)&&T.indexOf(X.split(" ")[0])===0},O,Q)})(['@font-face {font-family:"font";src:url("https://")}',["@media (",k.join("touch-enabled),("),a,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",k.join("transform-3d),("),a,")","{#csstransforms3d{left:9px;position:absolute;height:3px;}}"].join(""),['#generatedcontent:after{content:"',D,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);m.flexbox=function(){return n("flexOrder")};m["flexbox-legacy"]=function(){return n("boxDirection")};m.canvas=function(){var O=c.createElement("canvas");return !!(O.getContext&&O.getContext("2d"))};m.canvastext=function(){return !!(x.canvas&&s(c.createElement("canvas").getContext("2d").fillText,"function"))};m.webgl=function(){try{var P=c.createElement("canvas"),O;O=!!(B.WebGLRenderingContext&&(P.getContext("experimental-webgl")||P.getContext("webgl")));P=h}catch(Q){O=false}return O};m.touch=function(){return x.touch};m.geolocation=function(){return !!navigator.geolocation};m.postmessage=function(){return !!B.postMessage};m.websqldatabase=function(){return !!B.openDatabase};m.indexedDB=function(){return !!n("indexedDB",B)};m.hashchange=function(){return p("hashchange",B)&&(c.documentMode===h||c.documentMode>7)};m.history=function(){return !!(B.history&&history.pushState)};m.draganddrop=function(){var O=c.createElement("div");return("draggable" in O)||("ondragstart" in O&&"ondrop" in O)};m.websockets=function(){for(var P=-1,O=G.length;++P<O;){if(B[G[P]+"WebSocket"]){return true}}return"WebSocket" in B};m.rgba=function(){E("background-color:rgba(150,255,150,.5)");return u(F.backgroundColor,"rgba")};m.hsla=function(){E("background-color:hsla(120,40%,100%,.5)");return u(F.backgroundColor,"rgba")||u(F.backgroundColor,"hsla")};m.multiplebgs=function(){E("background:url(https://),url(https://),red url(https://)");return/(url\s*\(.*?){3}/.test(F.background)};m.backgroundsize=function(){return n("backgroundSize")};m.borderimage=function(){return n("borderImage")};m.borderradius=function(){return n("borderRadius")};m.boxshadow=function(){return n("boxShadow")};m.textshadow=function(){return c.createElement("div").style.textShadow===""};m.opacity=function(){v("opacity:.55");return/^0.55$/.test(F.opacity)};m.cssanimations=function(){return n("animationName")};m.csscolumns=function(){return n("columnCount")};m.cssgradients=function(){var Q="background-image:",P="gradient(linear,left top,right bottom,from(#9f9),to(white));",O="linear-gradient(left top,#9f9, white);";E((Q+"-webkit- ".split(" ").join(P+Q)+k.join(O+Q)).slice(0,-Q.length));return u(F.backgroundImage,"gradient")};m.cssreflections=function(){return n("boxReflect")};m.csstransforms=function(){return !!n("transform")};m.csstransforms3d=function(){var O=!!n("perspective");if(O&&"webkitPerspective" in N.style){O=x.csstransforms3d}return O};m.csstransitions=function(){return n("transition")};m.fontface=function(){return x.fontface};m.generatedcontent=function(){return x.generatedcontent};m.video=function(){var P=c.createElement("video"),O=false;try{if(O=!!P.canPlayType){O=new Boolean(O);O.ogg=P.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"");O.h264=P.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"");O.webm=P.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}}catch(Q){}return O};m.audio=function(){var P=c.createElement("audio"),O=false;try{if(O=!!P.canPlayType){O=new Boolean(O);O.ogg=P.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"");O.mp3=P.canPlayType("audio/mpeg;").replace(/^no$/,"");O.wav=P.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"");O.m4a=(P.canPlayType("audio/x-m4a;")||P.canPlayType("audio/aac;")).replace(/^no$/,"")}}catch(Q){}return O};m.localstorage=function(){try{localStorage.setItem(a,a);localStorage.removeItem(a);return true}catch(O){return false}};m.sessionstorage=function(){try{sessionStorage.setItem(a,a);sessionStorage.removeItem(a);return true}catch(O){return false}};m.webworkers=function(){return !!B.Worker};m.applicationcache=function(){return !!B.applicationCache};m.svg=function(){return !!c.createElementNS&&!!c.createElementNS(I.svg,"svg").createSVGRect};m.inlinesvg=function(){var O=c.createElement("div");O.innerHTML="<svg/>";return(O.firstChild&&O.firstChild.namespaceURI)==I.svg};m.smil=function(){return !!c.createElementNS&&/SVGAnimate/.test(b.call(c.createElementNS(I.svg,"animate")))};m.svgclippaths=function(){return !!c.createElementNS&&/SVGClipPath/.test(b.call(c.createElementNS(I.svg,"clipPath")))};function C(){x.input=(function(Q){for(var P=0,O=Q.length;P<O;P++){g[Q[P]]=!!(Q[P] in M)}if(g.list){g.list=!!(c.createElement("datalist")&&B.HTMLDataListElement)}return g})("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));x.inputtypes=(function(R){for(var Q=0,P,T,S,O=R.length;Q<O;Q++){M.setAttribute("type",T=R[Q]);P=M.type!=="text";if(P){M.value=D;M.style.cssText="position:absolute;visibility:hidden;";if(/^range$/.test(T)&&M.style.WebkitAppearance!==h){N.appendChild(M);S=c.defaultView;P=S.getComputedStyle&&S.getComputedStyle(M,null).WebkitAppearance!=="textfield"&&(M.offsetHeight!==0);N.removeChild(M)}else{if(/^(search|tel)$/.test(T)){}else{if(/^(url|email)$/.test(T)){P=M.checkValidity&&M.checkValidity()===false}else{if(/^color$/.test(T)){N.appendChild(M);N.offsetWidth;P=M.value!=D;N.removeChild(M)}else{P=M.value!=D}}}}}q[R[Q]]=!!P}return q})("search tel url email datetime date month week time datetime-local number range color".split(" "))}for(var w in m){if(f(m,w)){t=w.toLowerCase();x[t]=m[w]();e.push((x[t]?"":"no-")+t)}}x.input||C();x.addTest=function(P,Q){if(typeof P=="object"){for(var O in P){if(f(P,O)){x.addTest(O,P[O])}}}else{P=P.toLowerCase();if(x[P]!==h){return x}Q=typeof Q=="function"?Q():Q;N.className+=" "+(Q?"":"no-")+P;x[P]=Q}return x};E("");J=M=null;
/*! HTML5 Shiv v3.4 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */
(function(U,W){var Y=U.html5||{};var Q=/^<|^(?:button|form|map|select|textarea)$/i;var P;var R;(function(){var Z=W.createElement("a");Z.innerHTML="<xyz></xyz>";P=("hidden" in Z);R=Z.childNodes.length==1||(function(){try{(W.createElement)("a")}catch(aa){return true}var ab=W.createDocumentFragment();return(typeof ab.cloneNode=="undefined"||typeof ab.createDocumentFragment=="undefined"||typeof ab.createElement=="undefined")}())}());function X(Z,ab){var ac=Z.createElement("p"),aa=Z.getElementsByTagName("head")[0]||Z.documentElement;ac.innerHTML="x<style>"+ab+"</style>";return aa.insertBefore(ac.lastChild,aa.firstChild)}function T(){var Z=S.elements;return typeof Z=="string"?Z.split(" "):Z}function V(aa){var Z={},ad=aa.createElement,ab=aa.createDocumentFragment,ac=ab();aa.createElement=function(af){var ae=(Z[af]||(Z[af]=ad(af))).cloneNode();return S.shivMethods&&ae.canHaveChildren&&!Q.test(af)?ac.appendChild(ae):ae};aa.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+T().join().replace(/\w+/g,function(ae){Z[ae]=ad(ae);ac.createElement(ae);return'c("'+ae+'")'})+");return n}")(S,ac)}function O(aa){var Z;if(aa.documentShived){return aa}if(S.shivCSS&&!P){Z=!!X(aa,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")}if(!R){Z=!V(aa)}if(Z){aa.documentShived=Z}return aa}var S={elements:Y.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!(Y.shivCSS===false),shivMethods:!(Y.shivMethods===false),type:"default",shivDocument:O};U.html5=S;O(W)}(this,c));x._version=K;x._prefixes=k;x._domPrefixes=L;x._cssomPrefixes=G;x.mq=H;x.hasEvent=p;x.testProp=function(O){return A([O])};x.testAllProps=n;x.testStyles=o;x.prefixed=function(Q,P,O){if(!P){return n(Q,"pfx")}else{return n(Q,P,O)}};N.className=N.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(z?" js "+e.join(" "):"");return x})(this,this.document);