This repository has been archived by the owner on May 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.html
211 lines (202 loc) · 9.29 KB
/
popup.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>TUID Helper</title>
<link href="css/material.light_blue-red.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/material.icons.css">
<style type="text/css">
body {
min-width: 580px;
}
.emphasis{
font-weight: bold;
}
.white{
color: white;
}
</style>
</head>
<body>
<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect" style="padding-top: 20px; padding-left: 20px;">
<div class="mdl-tabs__tab-bar">
<a href="#dissect-panel" class="mdl-tabs__tab is-active" id="ttdissect">Dissect</a>
<a href="#generate-panel" class="mdl-tabs__tab" id="ttgenerate">Generate</a>
<a href="#history-panel" class="mdl-tabs__tab" id="tthistory"> <span class="mdl-badge" id="history-count" >History</span></a>
<a href="https://github.com/jspatel/tuid-processor" target="_blank" style="padding: 10px 15px 0 15px;" id="tthome">
<i class="material-icons">home</i>
</a>
</div>
<div class="mdl-tabs__panel is-active" id="dissect-panel">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--4-col">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" pattern="[34567]\d{17,18}"
id="inputTuid">
<label class="mdl-textfield__label" for="inputTuid">Tuid...</label>
<span class="mdl-textfield__error">Input is not a tuid!</span>
<div class="mdl-tooltip" for="inputTuid">At least 18 digits, with starting digit between 3-7</div>
</div>
</div>
<div class="mdl-cell mdl-cell--1-col">
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent"
id="dissectTuid">Dissect
</button>
</div>
</div>
<table class="mdl-data-table mdl-js-data-table invisible" id="tuidResult">
<tbody>
<tr>
<td class="mdl-data-table__cell--non-numeric">TUID</td>
<td id="tuidCol"></td>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">Base</th>
<td id="tuidBaseCol"></td>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">Epoch</th>
<td id="millisCol"></td>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">Counter</th>
<td id="counterCol"></td>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">Server ID</th>
<td id="serveridCol"></td>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">Local</th>
<td class="mdl-data-table__cell--non-numeric" id="localDateCol"></td>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">UTC</th>
<td class="mdl-data-table__cell--non-numeric" id="utcDateCol"></td>
</tr>
</tbody>
</table>
</div>
<div class="mdl-tabs__panel" id="generate-panel">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--2-col">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" pattern="[1234]\d{3}[01]\d[0123]\d"
id="inputDate">
<label class="mdl-textfield__label" for="inputDate">Date...</label>
<span class="mdl-textfield__error">Input is not a date!</span>
<div class="mdl-tooltip" for="inputDate">Input date in YYYYMMDD format</div>
</div>
</div>
<div class="mdl-cell mdl-cell--2-col">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" pattern="[0-2]\d[0-5]\d[0-5]\d"
id="inputTime">
<label class="mdl-textfield__label" for="inputTime">Time...</label>
<span class="mdl-textfield__error">Input is not a time!</span>
<div class="mdl-tooltip" for="inputTime">Input time in HHMMSS format</div>
</div>
</div>
<div class="mdl-cell mdl-cell--1-col">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" pattern="\d{1,4}"
id="inputCounter">
<label class="mdl-textfield__label" for="inputServerId">Counter...</label>
<span class="mdl-textfield__error">Input is not a counter!</span>
<div class="mdl-tooltip" for="inputCounter">Counter value < 1023</div>
</div>
</div>
<div class="mdl-cell mdl-cell--1-col">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" pattern="\d{1,3}"
id="inputServerId">
<label class="mdl-textfield__label" for="inputServerId">Server...</label>
<span class="mdl-textfield__error">Input is not a server id!</span>
<div class="mdl-tooltip" for="inputServerId">Server id value < 255</div>
</div>
</div>
<div class="mdl-cell mdl-cell--1-col">
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent"
id="generateTuid">Generate
</button>
</div>
</div>
<table class="mdl-data-table mdl-js-data-table invisible" id="gentuidResult">
<tbody>
<tr>
<td class="mdl-data-table__cell--non-numeric">TUID</td>
<td>
<span id="gentuidCol"></span>
</td>
<td>
<a href="" id="copy" ><i class="material-icons">content_copy</i></a>
<i class="material-icons hidden" id="copied">done</i>
</td>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">Base</th>
<td id="gentuidBaseCol"></td>
<td></td>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">Epoch</th>
<td id="genmillisCol"></td>
<td></td>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">Counter</th>
<td id="gencounterCol"></td>
<td></td>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">Server ID</th>
<td id="genserveridCol"></td>
<td></td>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">Local</th>
<td class="mdl-data-table__cell--non-numeric" id="genlocalDateCol"></td>
<td></td>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">UTC</th>
<td class="mdl-data-table__cell--non-numeric" id="genutcDateCol"></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="mdl-tabs__panel" id="history-panel">
<div class="mdl-grid">
<button class="mdl-button mdl-js-button mdl-js-ripple-effect" style="margin: auto;"
id="clearhistory">Clear History
</button>
</div>
<table class="mdl-data-table mdl-js-data-table">
<thead>
<tr>
<th class="mdl-data-table__cell--non-numeric">Type</th>
<th>Tuid</th>
<th class="mdl-data-table__cell--non-numeric">Tuid Date</th>
</tr>
</thead>
<tbody id="history-table">
</tbody>
</table>
</div>
<div class="mdl-tooltip " for="ttdissect">Dissect provided TUID</div>
<div class="mdl-tooltip " for="tthome">Visit TUID Helper home page for more information.</div>
<div class="mdl-tooltip " for="ttgenerate">Generated TUID froom provided input or using local date time.</div>
<div class="mdl-tooltip " for="tthistory">The history of most recently 25 <span class="emphasis">D</span>issected or <span class="emphasis">G</span>enerated TUIDs.</div>
<div class="mdl-tooltip " for="copy">Click to copy</div>
<div class="mdl-tooltip " for="copied">Tuid value copied</div>
<span id="toclipboard" class="white"></span>
</div>
<script src="js/material.min.js"></script>
<script src="js/BigInteger.js"></script>
<script src="js/TUID.js"></script>
<script src="js/tuid-helper.js"></script>
</body>
</html>