-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
82 lines (74 loc) · 2.35 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
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>browser-support-badge: Generate browser version compatibility badges..</title>
<meta name="keywords" content="browser-support-badge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<style type="text/css">
body {
max-width: 1000px;
margin: 0 auto;
padding: 10px 20px;
}
textarea {
display: block;
width: 100%;
height: 200px;
margin: 5px;
}
img {
max-width: 100%;
margin: 5px;
}
input {
margin: 5px;
float: right;
}
</style>
</head>
<body>
<h1> browser-support-badge </h1>
<p>
Project <a href="https://github.com/hustcc/browser-support-badge">browser-support-badge</a> is a tool to generate browser version compatibility badges.
</p>
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- sorry for ad -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-7292810486004926"
data-ad-slot="7806394673"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<div>
<textarea id="input">{
"explorer" : { "7.0" : false, "8.0" : false, "9.0" : false },
"firefox" : { "10.0" : true, "11.0" : true, "12.0" : false, "13.0" : true, "nightly" : true },
"chrome" : { "14.0" : true, "15.0" : true, "16.0" : true, "canary" : true },
"safari" : { "5.0.5" : false, "5.1.0" : false, "5.1.1" : true },
"opera" : { "10.6" : false, "11.0" : false, "11.6" : false },
"iphone": { "6.0" : true },
"ipad": { "6.0" : true },
"android-chrome": { "20.0" : true },
"android-browser": { "4.2" : true }
}</textarea>
<input type="button" value="Generate" onclick="javascript: generate();" />
</div>
<img id="result" src="./example/badge.png" />
<hr />
<p>
The code of browser-support-badge hosted on Github, click <a href="https://github.com/hustcc/browser-support-badge">here</a>. Welcome to issue or pull request.
</p>
<script type="text/javascript" src="./index.js"></script>
<script type="text/javascript">
function generate() {
var browsers = JSON.parse(document.getElementById('input').value);
browserSupportBadge(browsers, function (base64, canvas) {
document.getElementById('result').src = base64;
});
}
</script>
</body>
</html>