176 lines
6.4 KiB
HTML
176 lines
6.4 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<title>HTML5test - How well does your browser support HTML5?</title>
|
|
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=EDGE">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<style type="text/css">
|
|
|
|
html {
|
|
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", "Lucida Grande", sans-serif;
|
|
font-weight: 200;
|
|
font-size: 1em;
|
|
}
|
|
|
|
body {
|
|
background: #d9d9d9;
|
|
text-align: center;
|
|
margin: 20px;
|
|
}
|
|
|
|
p {
|
|
margin: 0 0 0.5em;
|
|
}
|
|
a {
|
|
color: #0092bf;
|
|
text-decoration: none;
|
|
}
|
|
code {
|
|
font-size: 1.2em;
|
|
}
|
|
|
|
</style>
|
|
|
|
<script src='/scripts/base.js' type='text/javascript'></script>
|
|
<script src='/scripts/8/engine.js' type='text/javascript'></script>
|
|
<script src='/scripts/8/data.js' type='text/javascript'></script>
|
|
|
|
<script>
|
|
(function(){var p=[],w=window,d=document,e=f=0;p.push('ua='+encodeURIComponent(navigator.userAgent));e|=w.ActiveXObject?1:0;e|=w.opera?2:0;e|=w.chrome?4:0;
|
|
e|='getBoxObjectFor' in d || 'mozInnerScreenX' in w?8:0;e|=('WebKitCSSMatrix' in w||'WebKitPoint' in w||'webkitStorageInfo' in w||'webkitURL' in w)?16:0;
|
|
e|=(e&16&&({}.toString).toString().indexOf("\n")===-1)?32:0;p.push('e='+e);f|='sandbox' in d.createElement('iframe')?1:0;f|='WebSocket' in w?2:0;
|
|
f|=w.Worker?4:0;f|=w.applicationCache?8:0;f|=w.history && history.pushState?16:0;f|=d.documentElement.webkitRequestFullScreen?32:0;f|='FileReader' in w?64:0;
|
|
p.push('f='+f);p.push('r='+Math.random().toString(36).substring(7));p.push('w='+screen.width);p.push('h='+screen.height);var s=d.createElement('script');
|
|
s.src='//api.whichbrowser.net/rel/detect.js?' + p.join('&');d.getElementsByTagName('head')[0].appendChild(s);})();
|
|
</script>
|
|
</head>
|
|
|
|
|
|
<body>
|
|
<div id="qr"></div>
|
|
<script>
|
|
<!--
|
|
|
|
|
|
function waitForWhichBrowser(cb) {
|
|
var callback = cb;
|
|
|
|
function wait() {
|
|
if (typeof WhichBrowser == 'undefined')
|
|
window.setTimeout(wait, 100)
|
|
else
|
|
callback();
|
|
}
|
|
|
|
wait();
|
|
}
|
|
|
|
waitForWhichBrowser(function() {
|
|
|
|
Browsers = new WhichBrowser({
|
|
useFeatures: true,
|
|
detectCamouflage: true
|
|
});
|
|
|
|
start();
|
|
});
|
|
|
|
function start() {
|
|
var params = {};
|
|
|
|
if (location.search) {
|
|
var parts = location.search.substring(1).split('&');
|
|
|
|
for (var i = 0; i < parts.length; i++) {
|
|
var nv = parts[i].split('=');
|
|
if (!nv[0]) continue;
|
|
params[nv[0]] = nv[1] || true;
|
|
}
|
|
}
|
|
|
|
var identifier = typeof params.identifier != 'undefined' ? params.identifier : null;
|
|
var source = typeof params.source != 'undefined' ? params.source : null;
|
|
var task = typeof params.task != 'undefined' ? params.task : null;
|
|
|
|
|
|
new Test(function(r) {
|
|
var c = new Calculate(r, tests);
|
|
|
|
document.getElementById('qr').innerHTML +=
|
|
"<p>You can see the results here:</p>" +
|
|
"<p><a href='http://html5te.st/" + r.uniqueid + "'>html5te.st/" + r.uniqueid + "</a></p>" +
|
|
"<p>Or scan this QR-code:</p>" +
|
|
"<p>" +
|
|
"<img src='https://chart.googleapis.com/chart?chs=200x200&cht=qr&chl=" + encodeURIComponent("http://html5te.st/" + r.uniqueid) + "&choe=UTF-8' width='200' height='200'>" +
|
|
"</p>" +
|
|
"<p>The unique id for this test is:<br><code>" + r.uniqueid + "</code></p>";
|
|
|
|
|
|
var payload = '{' +
|
|
'"release": "' + r.release + '",' +
|
|
'"source": "' + source + '",' +
|
|
'"identifier": "' + identifier + '",' +
|
|
'"task": "' + task + '",' +
|
|
'"uniqueid": "' + r.uniqueid + '",' +
|
|
'"score": ' + c.score + ',' +
|
|
'"maximum": ' + c.maximum + ',' +
|
|
'"camouflage": "' + (Browsers.camouflage ? '1' : '0') + '",' +
|
|
'"features": "' + (Browsers.features.join(',')) + '",' +
|
|
'"browserName": "' + (Browsers.browser.name ? Browsers.browser.name : '') + '",' +
|
|
'"browserChannel": "' + (Browsers.browser.channel ? Browsers.browser.channel : '') + '",' +
|
|
'"browserVersion": "' + (Browsers.browser.version ? Browsers.browser.version.toString() : '') + '",' +
|
|
'"browserVersionType": "' + (Browsers.browser.version ? Browsers.browser.version.type : '') + '",' +
|
|
'"browserVersionMajor": "' + (Browsers.browser.version ? Browsers.browser.version.major : '') + '",' +
|
|
'"browserVersionMinor": "' + (Browsers.browser.version ? Browsers.browser.version.minor : '') + '",' +
|
|
'"browserVersionOriginal": "' + (Browsers.browser.version ? Browsers.browser.version.original : '') + '",' +
|
|
'"browserMode": "' + (Browsers.browser.mode ? Browsers.browser.mode : '') + '",' +
|
|
'"engineName": "' + (Browsers.engine.name ? Browsers.engine.name : '') + '",' +
|
|
'"engineVersion": "' + (Browsers.engine.version ? Browsers.engine.version.toString() : '') + '",' +
|
|
'"osName": "' + (Browsers.os.name ? Browsers.os.name : '') + '",' +
|
|
'"osFamily": "' + (Browsers.os.family ? Browsers.os.family : '') + '",' +
|
|
'"osVersion": "' + (Browsers.os.version ? Browsers.os.version.toString() : '') + '",' +
|
|
'"deviceManufacturer": "' + (Browsers.device.manufacturer ? Browsers.device.manufacturer : '') + '",' +
|
|
'"deviceModel": "' + (Browsers.device.model ? Browsers.device.model : '') + '",' +
|
|
'"deviceSeries": "' + (Browsers.device.series ? Browsers.device.series : '') + '",' +
|
|
'"deviceType": "' + (Browsers.device.type ? Browsers.device.type : '') + '",' +
|
|
'"deviceIdentified": "' + (Browsers.device.identified ? '1' : '0' ) + '",' +
|
|
'"deviceWidth": "' + (screen.width) + '",' +
|
|
'"deviceHeight": "' + (screen.height) + '",' +
|
|
'"useragent": "' + navigator.userAgent + '",' +
|
|
'"humanReadable": "' + Browsers.toString() + '",' +
|
|
'"points": "' + c.points + '",' +
|
|
'"results": "' + r.results + '"' +
|
|
'}';
|
|
|
|
submit('submit', payload);
|
|
|
|
function submit(method, payload) {
|
|
var httpRequest;
|
|
if (window.XMLHttpRequest) {
|
|
httpRequest = new XMLHttpRequest();
|
|
} else if (window.ActiveXObject) {
|
|
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
|
|
}
|
|
|
|
httpRequest.open('POST','/api/' + method, true);
|
|
httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
httpRequest.send('payload=' + encodeURIComponent(payload));
|
|
}
|
|
},
|
|
|
|
function(e) {
|
|
if (typeof console != 'undefined') console.log(e);
|
|
alert('Test has failed: ' + e.message);
|
|
});
|
|
}
|
|
|
|
|
|
//-->
|
|
</script>
|
|
</body>
|
|
</html>
|