forked from googlearchive/chrome-nfc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.html
127 lines (124 loc) · 4.5 KB
/
app.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!DOCTYPE html>
<html>
<head>
<title>chrome.nfc API sample</title>
<link href="lib/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="app.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="wrapper">
<div class="page-header">
<h1>chrome.nfc API sample</h1>
</div>
<ul class="nav nav-tabs">
<li class="active"><a href="#home" data-toggle="tab">Device</a></li>
<li class="dropdown">
<a href="#" id="myTabDrop1" class="dropdown-toggle" data-toggle="dropdown">Read <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop1">
<li><a href="#read-ndef" tabindex="-1" data-toggle="tab">Read NDEF Tag</a></li>
<li><a href="#read-mifare" tabindex="-1" data-toggle="tab">Read Mifare Classic Tag</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" id="myTabDrop2" class="dropdown-toggle" data-toggle="dropdown">Write <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop2">
<li><a href="#write-ndef" tabindex="-1" data-toggle="tab">Write NDEF Tag</a></li>
<li><a href="#write-mifare" tabindex="-1" data-toggle="tab">Write Mifare Classic Tag</a></li>
</ul>
</li>
<li><a href="#emulate" data-toggle="tab">Emulate</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="home">
<img id="device-thumbnail" class="hidden"/>
<dl id="device-info">
<dt>Name</dt>
<dd id="device-name"></dd>
<dt>Vendor ID</dt>
<dd id="device-vendor-id"></dd>
<dt>Product ID</dt>
<dd id="device-product-id"></dd>
</dl>
</div>
<div class="tab-pane" id="read-ndef">
<pre></pre>
<button type="button" class="btn btn-default">Run</button>
</div>
<div class="tab-pane" id="read-mifare">
<pre></pre>
<button type="button" class="btn btn-default">Run</button>
</div>
<div class="tab-pane" id="write-ndef">
<pre></pre>
<form role="form">
<div class="form-group">
<label for="write-ndef-type">Pick NDEF Type:</label>
<select id="write-ndef-type" class="form-control">
<option>text</option>
<option>uri</option>
<option>aar</option>
</select>
</div>
<div class="form-group">
<label for="write-ndef-value">Enter NDEF Value:</label>
<input type="text" class="form-control" id="write-ndef-value">
</div>
<div class="form-group">
<button type="button" class="btn btn-default">Run</button>
</div>
</form>
</div>
<div class="tab-pane" id="write-mifare">
<pre></pre>
<form role="form">
<div class="form-group">
<label for="mifare-data">Enter Mifare Data:</label>
<textarea id ="mifare-data">
[
219, 0, 3, 225, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
3, 15, 209, 1, 11, 85, 3, 103,
111, 111, 103, 108, 101, 46, 99, 111,
109, 254, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0
]</textarea>
</div>
<div class="form-group">
<button type="button" class="btn btn-default">Run</button>
</div>
</form>
</div>
<div class="tab-pane" id="emulate">
<pre></pre>
<form role="form">
<div class="form-group">
<label for="emulate-ndef-type">Pick NDEF Type:</label>
<select id="emulate-ndef-type" class="form-control">
<option>text</option>
<option>uri</option>
<option>aar</option>
</select>
</div>
<div class="form-group">
<label for="emulate-ndef-value">Enter NDEF Value:</label>
<input type="text" class="form-control" id="emulate-ndef-value">
</div>
<div class="form-group">
<button type="button" class="btn btn-default">Run</button>
</div>
</form>
</div>
</div>
</div>
<div id="logContainer" class="small">
<div class="drawer"></div>
<div class="logs"></div>
</div>
<script src="lib/jquery-2.1.0.min.js"></script>
<script src="lib/bootstrap.min.js"></script>
<script src="chrome-nfc.js"></script>
<script src="app.js"></script>
</body>
</html>