/* * modernizr v3.5.0 * Build https://modernizr.com/download?-audio-audioloop-csscolumns-cssvhunit-cssvmaxunit-cssvminunit-cssvwunit-filereader-flexbox-fullscreen-geolocation-hashchange-history-input-inputtypes-touchevents-video-webaudio-addtest-atrule-domprefixes-hasevent-mq-prefixed-prefixedcss-prefixedcssvalue-prefixes-testallprops-testprop-dontmin * * Copyright (c) * Faruk Ates * Paul Irish * Alex Sexton * Ryan Seddon * Patrick Kettner * Stu Cox * Richard Herrera * MIT License */ (function(window,document,undefined){var tests=[];var ModernizrProto={_version:"3.5.0",_config:{classPrefix:"",enableClasses:true,enableJSClass:true,usePrefixes:true},_q:[],on:function(test,cb){var self=this;setTimeout(function(){cb(self[test])},0)},addTest:function(name,fn,options){tests.push({name:name,fn:fn,options:options})},addAsyncTest:function(fn){tests.push({name:null,fn:fn})}};var Modernizr=function(){};Modernizr.prototype=ModernizrProto;Modernizr=new Modernizr(); /* { "name": "Geolocation API", "property": "geolocation", "caniuse": "geolocation", "tags": ["media"], "notes": [{ "name": "MDN documentation", "href": "https://developer.mozilla.org/en-US/docs/WebAPI/Using_geolocation" }], "polyfills": [ "joshuabell-polyfill", "webshims", "geo-location-javascript", "geolocation-api-polyfill" ] } !*/ Modernizr.addTest("geolocation","geolocation" in navigator); /* { "name": "History API", "property": "history", "caniuse": "history", "tags": ["history"], "authors": ["Hay Kranen", "Alexander Farkas"], "notes": [{ "name": "W3C Spec", "href": "https://www.w3.org/TR/html51/browsers.html#the-history-interface" }, { "name": "MDN documentation", "href": "https://developer.mozilla.org/en-US/docs/Web/API/window.history" }], "polyfills": ["historyjs", "html5historyapi"] } !*/ Modernizr.addTest("history",function(){var ua=navigator.userAgent;if((ua.indexOf("Android 2.")!==-1||(ua.indexOf("Android 4.0")!==-1))&&ua.indexOf("Mobile Safari")!==-1&&ua.indexOf("Chrome")===-1&&ua.indexOf("Windows Phone")===-1&&location.protocol!=="file:"){return false}return(window.history&&"pushState" in window.history)}); /* { "name": "Web Audio API", "property": "webaudio", "caniuse": "audio-api", "polyfills": ["xaudiojs", "dynamicaudiojs", "audiolibjs"], "tags": ["audio", "media"], "builderAliases": ["audio_webaudio_api"], "authors": ["Addy Osmani"], "notes": [{ "name": "W3 Specification", "href": "https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html" }] } !*/ Modernizr.addTest("webaudio",function(){var prefixed="webkitAudioContext" in window;var unprefixed="AudioContext" in window;if(Modernizr._config.usePrefixes){return prefixed||unprefixed}return unprefixed}); /* { "name": "File API", "property": "filereader", "caniuse": "fileapi", "notes": [{ "name": "W3C Working Draft", "href": "https://www.w3.org/TR/FileAPI/" }], "tags": ["file"], "builderAliases": ["file_api"], "knownBugs": ["Will fail in Safari 5 due to its lack of support for the standards defined FileReader object"] } !*/ Modernizr.addTest("filereader",!!(window.File&&window.FileList&&window.FileReader));var prefixes=(ModernizrProto._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""]);ModernizrProto._prefixes=prefixes;var classes=[];function is(obj,type){return typeof obj===type}function testRunner(){var featureNames;var feature;var aliasIdx;var result;var nameIdx;var featureName;var featureNameSplit;for(var featureIdx in tests){if(tests.hasOwnProperty(featureIdx)){featureNames=[];feature=tests[featureIdx];if(feature.name){featureNames.push(feature.name.toLowerCase());if(feature.options&&feature.options.aliases&&feature.options.aliases.length){for(aliasIdx=0;aliasIdx7)});var prefixedCSSValue=function(prop,value){var result=false;var elem=createElement("div");var style=elem.style;if(prop in style){var i=domPrefixes.length;style[prop]=value;result=style[prop];while(i--&&!result){style[prop]="-"+domPrefixes[i]+"-"+value;result=style[prop]}}if(result===""){result=false}return result};ModernizrProto.prefixedCSSValue=prefixedCSSValue; /* { "name" : "HTML5 Audio Element", "property": "audio", "tags" : ["html5", "audio", "media"] } !*/ Modernizr.addTest("audio",function(){var elem=createElement("audio");var bool=false;try{bool=!!elem.canPlayType;if(bool){bool=new Boolean(bool);bool.ogg=elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"");bool.mp3=elem.canPlayType('audio/mpeg; codecs="mp3"').replace(/^no$/,"");bool.opus=elem.canPlayType('audio/ogg; codecs="opus"')||elem.canPlayType('audio/webm; codecs="opus"').replace(/^no$/,"");bool.wav=elem.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"");bool.m4a=(elem.canPlayType("audio/x-m4a;")||elem.canPlayType("audio/aac;")).replace(/^no$/,"")}}catch(e){}return bool}); /* { "name": "HTML5 Video", "property": "video", "caniuse": "video", "tags": ["html5"], "knownBugs": [ "Without QuickTime, `Modernizr.video.h264` will be `undefined`; https://github.com/Modernizr/Modernizr/issues/546" ], "polyfills": [ "html5media", "mediaelementjs", "sublimevideo", "videojs", "leanbackplayer", "videoforeverybody" ] } !*/ Modernizr.addTest("video",function(){var elem=createElement("video");var bool=false;try{bool=!!elem.canPlayType;if(bool){bool=new Boolean(bool);bool.ogg=elem.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"");bool.h264=elem.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"");bool.webm=elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"");bool.vp9=elem.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"");bool.hls=elem.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")}}catch(e){}return bool}); /* { "name": "Audio Loop Attribute", "property": "audioloop", "tags": ["audio", "media"] } !*/ Modernizr.addTest("audioloop","loop" in createElement("audio"));var inputElem=createElement("input"); /* { "name": "Input attributes", "property": "input", "tags": ["forms"], "authors": ["Mike Taylor"], "notes": [{ "name": "WHATWG spec", "href": "https://html.spec.whatwg.org/multipage/forms.html#input-type-attr-summary" }], "knownBugs": ["Some blackberry devices report false positive for input.multiple"] } !*/ var inputattrs="autocomplete autofocus list placeholder max min multiple pattern required step".split(" ");var attrs={};Modernizr.input=(function(props){for(var i=0,len=props.length;i