This repository has been archived by the owner on Dec 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
77 lines (68 loc) · 2.79 KB
/
index.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Browserizr</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
<link rel="stylesheet" href="https://bootswatch.com/4/lux/bootstrap.min.css">
<link rel="stylesheet" href="./assets/css/bootstrap-custom.css">
</head>
<body>
<div class="container my-4">
<h1>Browserizr</h1>
<hr>
<p>
<strong>Browserizr</strong> is tiny library, that detects your browser and platform, <br>
with testing <code class="show-code">window.navigator.userAgent</code>
and <code class="show-code">window.navigator.platform</code>.
</p>
<div class="alert alert-info">
<h3>Browserizr checked your browser and find that it is:</h3>
<ul id="browserizr-check">
<li><code class="show-code">... processing</code></li>
</ul>
<h4>userAgent</h4>
<p><code class="show-code" id="browserizr-userAgent">...</code></p>
<h4>platform</h4>
<p><code class="show-code" id="browserizr-platform">...</code></p>
</div>
<hr>
<h3>Docs</h3>
<p>
More info about <strong>Browserizr</strong>, read on github repository page <br>
<a href="https://github.com/WezomAgency/browserizr">https://github.com/WezomAgency/browserizr</a>
</p>
<ul>
<li><a href="https://github.com/WezomAgency/browserizr#install">#Install</a></li>
<li><a href="https://github.com/WezomAgency/browserizr#usage">#Usage</a></li>
<li><a href="https://github.com/WezomAgency/browserizr#list-of-built-in-tests">#List of built-in tests</a></li>
<li><a href="https://github.com/WezomAgency/browserizr#api">#API</a></li>
</ul>
<hr>
</div>
<script src="./dist/browserizr.js"></script>
<script>
(function (Browserizr) {
var browser = window.Browserizr.detect();
var detectedResults = [];
for (var test in browser) {
if (
/^is/.test(test) &&
browser[test]()
) {
detectedResults.push(test.replace(/^is/, ''));
}
}
console.log(Browserizr.prefixIs);
console.log(Browserizr.detect());
document.getElementById('browserizr-check').innerHTML = detectedResults.map(function(result) {
return '<li><code class="show-code">' + result + '</code></li>'
}).join('\n');
document.getElementById('browserizr-userAgent').innerHTML = window.navigator.userAgent;
document.getElementById('browserizr-platform').innerHTML = window.navigator.platform;
})(window.Browserizr);
</script>
</body>
</html>