-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex-test.html
35 lines (34 loc) · 983 Bytes
/
index-test.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
31
32
33
34
35
<!DOCTYPE html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>MacOS codeName</title>
<meta charset="utf-8">
<meta name="description" content="">
<link rel="stylesheet" href="">
</head>
<body>
<script src="./js/macos-identifier.js"></script>
<script src="./js/uaList.js"></script>
<script>
// view code name
var viewCodeName = function(codeName, fontSize) {
if( !fontSize ) fontSize = 100;
var div = document.createElement("div");
div.style.fontSize = fontSize + "px";
div.style.fontFamily="Verdana,arial,sans-serif";
var txt = document.createTextNode(codeName);
div.appendChild(txt);
document.body.appendChild(div);
}
for(var idx in uaList){
console.log("____");
var codeName = (function(moi){
if( uaList[idx].match(/####.*####/) ) { return uaList[idx] };
return uaList[idx] + " : " + (moi.judge(uaList[idx]) || "no MacOS");
})(new MacOSIdentifier);
console.log(codeName);
viewCodeName(codeName, 6);
}
</script>
</body>
</html>