Completed
Push — master ( 3eac5a...b98009 )
by Vladimir
04:57
created

web/build/modernizr-bundle.js (8 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
!function(e,t,n){function r(e,t){return typeof e===t}function s(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):S?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function o(e,t){return!!~(""+e).indexOf(t)}function i(){var e=t.body;return e||(e=s(S?"svg":"body"),e.fake=!0),e}function a(e,n,r,o){var a,l,f,u,c="modernizr",d=s("div"),p=i();if(parseInt(r,10))for(;r--;)f=s("div"),f.id=o?o[r]:c+(r+1),d.appendChild(f);return a=s("style"),a.type="text/css",a.id="s"+c,(p.fake?p:d).appendChild(a),p.appendChild(d),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(t.createTextNode(e)),d.id=c,p.fake&&(p.style.background="",p.style.overflow="hidden",u=x.style.overflow,x.style.overflow="hidden",x.appendChild(p)),l=n(d,e),p.fake?(p.parentNode.removeChild(p),x.style.overflow=u,x.offsetHeight):d.parentNode.removeChild(d),!!l}function l(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function f(t,n,r){var s;if("getComputedStyle"in e){s=getComputedStyle.call(e,t,n);var o=e.console;if(null!==s)r&&(s=s.getPropertyValue(r));else if(o){var i=o.error?"error":"log";o[i].call(o,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else s=!n&&t.currentStyle&&t.currentStyle[r];return s}function u(t,r){var s=t.length;if("CSS"in e&&"supports"in e.CSS){for(;s--;)if(e.CSS.supports(l(t[s]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var o=[];s--;)o.push("("+l(t[s])+":"+r+")");return o=o.join(" or "),a("@supports ("+o+") { #modernizr { position: absolute; } }",function(e){return"absolute"==f(e,null,"position")})}return n}function c(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function d(e,t,i,a){function l(){d&&(delete P.style,delete P.modElem)}if(a=!r(a,"undefined")&&a,!r(i,"undefined")){var f=u(e,i);if(!r(f,"undefined"))return f}for(var d,p,v,m,g,h=["modernizr","tspan","samp"];!P.style&&h.length;)d=!0,P.modElem=s(h.shift()),P.style=P.modElem.style;for(v=e.length,p=0;v>p;p++)if(m=e[p],g=P.style[m],o(m,"-")&&(m=c(m)),P.style[m]!==n){if(a||r(i,"undefined"))return l(),"pfx"!=t||m;try{P.style[m]=i}catch(e){}if(P.style[m]!=g)return l(),"pfx"!=t||m}return l(),!1}function p(e,t){return function(){return e.apply(t,arguments)}}function v(e,t,n){var s;for(var o in e)if(e[o]in t)return!1===n?e[o]:(s=t[e[o]],r(s,"function")?p(s,n||t):s);return!1}function m(e,t,n,s,o){var i=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+_.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?d(a,t,s,o):(a=(e+" "+z.join(i+" ")+i).split(" "),v(a,t,n))}function g(e,t,r){return m(e,n,n,t,r)}var h=[],y={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){h.push({name:e,fn:t,options:n})},addAsyncTest:function(e){h.push({name:null,fn:e})}},C=function(){};C.prototype=y,C=new C;var w=[],x=t.documentElement,S="svg"===x.nodeName.toLowerCase();C.addTest("canvas",function(){var e=s("canvas");return!(!e.getContext||!e.getContext("2d"))}),C.addTest("canvastext",function(){return!1!==C.canvas&&"function"==typeof s("canvas").getContext("2d").fillText}),C.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);var T="Moz O ms Webkit",_=y._config.usePrefixes?T.split(" "):[];y._cssomPrefixes=_;var b={elem:s("modernizr")};C._q.push(function(){delete b.elem});var P={style:b.elem.style};C._q.unshift(function(){delete P.style});var z=y._config.usePrefixes?T.toLowerCase().split(" "):[];y._domPrefixes=z,y.testAllProps=m,y.testAllProps=g,C.addTest("cssanimations",g("animationName","a",!0));var E=y._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];y._prefixes=E,C.addTest("csscalc",function(){var e="width:",t=s("a");return t.style.cssText=e+E.join("calc(10px);"+e),!!t.style.length}),C.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&g("transform","scale(1)",!0)}),C.addTest("csstransitions",g("transition","all",!0)),(y.testStyles=a)("#modernizr { height: 50vh; }",function(t){var n=parseInt(e.innerHeight/2,10),r=parseInt(f(t,null,"height"),10);C.addTest("cssvhunit",r==n)}),C.addTest("inlinesvg",function(){var e=s("div");return e.innerHTML="<svg/>","http://www.w3.org/2000/svg"==("undefined"!=typeof SVGRect&&e.firstChild&&e.firstChild.namespaceURI)}),function(){var e,t,n,s,o,i,a;for(var l in h)if(h.hasOwnProperty(l)){if(e=[],t=h[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(s=r(t.fn,"function")?t.fn():t.fn,o=0;o<e.length;o++)i=e[o],a=i.split("."),1===a.length?C[a[0]]=s:(!C[a[0]]||C[a[0]]instanceof Boolean||(C[a[0]]=new Boolean(C[a[0]])),C[a[0]][a[1]]=s),w.push((s?"":"no-")+a.join("-"))}}(),function(e){var t=x.className,n=C._config.classPrefix||"";if(S&&(t=t.baseVal),C._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}C._config.enableClasses&&(t+=" "+n+e.join(" "+n),S?x.className.baseVal=t:x.className=t)}(w),delete y.addTest,delete y.addAsyncTest;for(var N=0;N<C._q.length;N++)C._q[N]();e.Modernizr=C}(window,document);
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
Did you forget to assign or call a function?

This error message can for example pop up if you forget to assign the result of a function call to a variable or pass it to another function:

function someFunction(x) {
    (x > 0) ? callFoo() : callBar();
}

// JSHint expects you to assign the result to a variable:
function someFunction(x) {
    var rs = (x > 0) ? callFoo() : callBar();
}

// If you do not use the result, you could also use if statements in the
// case above.
function someFunction(x) {
    if (x > 0) {
        callFoo();
    } else {
        callBar();
    }
}
Loading history...
Value of 'e' may be overwritten in IE 8 and earlier.
Loading history...
The usage of ! looks confusing here.

The following shows a case which JSHint considers confusing and its respective non-confusing counterpart:

! (str.indexOf(i) > -1) // Bad
str.indexOf(i) === -1 // Good
Loading history...
The constructor invocation misses ().

This requirement purely is a coding style requirement and is not required to run on JavaScript engines:

new Date; // Bad
new Date(); // Good
Loading history...
Bad invocation.
Loading history...
Do not use Boolean as a constructor.
Loading history...
There were too many errors found in this file; checking aborted after 100%.

If JSHint finds too many errors in a file, it aborts checking altogether because it suspects a configuration issue.

Further Reading:

Loading history...