-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavigatortest.html
30 lines (29 loc) · 1.1 KB
/
navigatortest.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<html>
<head>
<script type="text/javascript" src="https://wurfl.io/wurfl.js"></script>
</head>
<body>
<div><a href="test.html">DPR Test</a></div><br/>
<div><a href="windowtest.html">Window Environment Test</a></div><br/>
<div><a href="webgltest.html">Webgl Environment Test</a></div><br/>
<div id="ua"></div><br/>
<div id="wurfljs"></div><br/>
<div id="navigator"></div><br/>
<script>
// Adapted from https://stackoverflow.com/questions/5063489/how-can-you-get-the-css-pixel-device-pixel-ratio/5063727
document.getElementById("ua").innerHTML = "User-Agent: " + navigator.userAgent;
document.getElementById("wurfljs").innerHTML = "Complete Device Name: " + WURFL.complete_device_name;
var navi = document.getElementById("navigator");
for(var property in navigator){
var str = navigator[property];
if(typeof(str) == 'object') {
for(var subproperty in str){
var substr = str[subproperty];
navi.innerHTML += property+ " <em>"+substr+"</em><br />";
}
}
navi.innerHTML += property+ " <em>"+str+"</em><br />";
}
</script>
</body>
</html>