1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/webtrees_ynh.git synced 2024-09-03 18:26:37 +02:00
webtrees_ynh/sources/packages/modernizr-2.8.3/modernizr.min.js

1 line
11 KiB
JavaScript
Raw Normal View History

window.Modernizr=function(Y,Z,Q){function T(b,d){return typeof b===d}function N(e,h){for(var d in e){var g=e[d];if(!~(""+g).indexOf("-")&&W[g]!==Q){return"pfx"==h?g:!0}}return !1}function V(h,n,g){var k=h.charAt(0).toUpperCase()+h.slice(1),l=(h+" "+M.join(k+" ")+k).split(" ");if(T(n,"string")||T(n,"undefined")){n=N(l,n)}else{h:{l=(h+" "+K.join(k+" ")+k).split(" "),h=l;for(var m in h){if(k=n[h[m]],k!==Q){n=!1===g?h[m]:T(k,"function")?k.bind(g||n):k;break h}}n=!1}}return n}function c(){aa.input=function(e){for(var g=0,d=e.length;d>g;g++){L[e[g]]=!!(e[g] in X)}return L.list&&(L.list=!(!Z.createElement("datalist")||!Y.HTMLDataListElement)),L}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));aa.inputtypes=function(h){for(var n,e,l,m=0,k=h.length;k>m;m++){X.setAttribute("type",e=h[m]),(n="text"!==X.type)&&(X.value=j,X.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(e)&&X.style.WebkitAppearance!==Q?(U.appendChild(X),l=Z.defaultView,n=l.getComputedStyle&&"textfield"!==l.getComputedStyle(X,null).WebkitAppearance&&0!==X.offsetHeight,U.removeChild(X)):/^(search|tel)$/.test(e)||(n=/^(url|email)$/.test(e)?X.checkValidity&&!1===X.checkValidity():X.value!=j)),s[h[m]]=!!n}return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var u,f,aa={},U=Z.documentElement,ab=Z.createElement("modernizr"),W=ab.style,X=Z.createElement("input"),j=":)",o={}.toString,r=" -webkit- -moz- -o- -ms- ".split(" "),M=["Webkit","Moz","O","ms"],K=["webkit","moz","o","ms"],ab={},s={},L={},a=[],S=a.slice,R=function(y,w,x,t){var v,q,m,p,e=Z.createElement("div"),n=Z.body,z=n||Z.createElement("body");if(parseInt(x,10)){for(;x--;){m=Z.createElement("div"),m.id=t?t[x]:"modernizr"+(x+1),e.appendChild(m)}}return v=['&#173;<style id="smodernizr">',y,"</style>"].join(""),e.id="modernizr",(n?e:z).innerHTML+=v,z.appendChild(e),n||(z.style.background="",z.style.overflow="hidden",p=U.style.overflow,U.style.overflow="hidden",U.appendChild(z)),q=w(e,y),n?e.parentNode.removeChild(e):(z.parentNode.removeChild(z),U.style.overflow=p),!!q},i=function(){var b={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(g,d){d=d||Z.createElement(b[g]||"div");g="on"+g;var e=g in d;return e||(d.setAttribute||(d=Z.createElement("div")),d.setAttribute&&d.removeAttribute&&(d.setAttribute(g,""),e=T(d[g],"function"),T(d[g],"undefined")||(d[g]=Q),d.removeAttribute(g))),e}}(),P={}.hasOwnProperty;f=T(P,"undefined")||T(P.call,"undefined")?function(b,d){return d in b&&T(b.constructor.prototype[d],"undefined")}:function(b,d){return P.call(b,d)};Function.prototype.bind||(Function.prototype.bind=function(e){var h=this;if("function"!=typeof h){throw new TypeError}var d=S.call(arguments,1),g=function(){if(this instanceof g){var k=function(){};k.prototype=h.prototype;var k=new k,b=h.apply(k,d.concat(S.call(arguments)));return Object(b)===b?b:k}return h.apply(e,d.concat(S.call(arguments)))};return g});ab.flexbox=function(){return V("flexWrap")};ab.flexboxlegacy=function(){return V("boxDirection")};ab.canvas=function(){var b=Z.createElement("canvas");return !(!b.getContext||!b.getContext("2d"))};ab.canvastext=function(){return !(!aa.canvas||!T(Z.createElement("canvas").getContext("2d").fillText,"function"))};ab.webgl=function(){return !!Y.WebGLRenderingContext};ab.touch=function(){var b;return"ontouchstart" in Y||Y.DocumentTouch&&Z instanceof DocumentTouch?b=!0:R(["@media (",r.join("touch-enabled),("),"modernizr){#modernizr{top:9px;position:absolute}}"].join(""),function(d){b=9===d.offsetTop}),b};ab.geolocation=function(){return"geolocation" in navigator};ab.postmessage=function(){return !!Y.postMessage};ab.websqldatabase=function(){return !!Y.openDatabase};ab.indexedDB=function(){return !!V("indexedDB",Y)};ab.hashchange=function(){return i("hashchange",Y)&&(Z.documentMode===Q||7<Z.documentMode)};ab.history=function(){return !(!Y.history||!history.pushState)};ab.draganddrop=function(){var b=Z.createElement("div");return"draggable" in b||"ondra