-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog.html
More file actions
28 lines (26 loc) · 1010 Bytes
/
log.html
File metadata and controls
28 lines (26 loc) · 1010 Bytes
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
<!DOCTYPE html>
<html>
<head><title>Saved Gs</title></head>
<body>
<h1>Saved Gs - <a href="ticks.html">Ticks</a></h1>
<ul id="items"></ul>
<script>
document.getElementById("items").innerHTML =
Object.keys(localStorage)
.filter(key => !isNaN(key))
.sort((a,b) => a - b)
.map(key => {
const date = new Date(Number(key));
const yy = date.getFullYear().toString().slice(-2);
const mm = (date.getMonth()+1).toString().padStart(2,'0');
const dd = date.getDate().toString().padStart(2,'0');
const hh = date.getHours().toString().padStart(2,'0');
const min = date.getMinutes().toString().padStart(2,'0');
const ss = date.getSeconds().toString().padStart(2,'0');
const ms = date.getMilliseconds().toString().padStart(3,'0');
return `<li>${yy}/${mm}/${dd} ${hh}:${min}:${ss}.${ms} - ${localStorage.getItem(key)}</li>`;
})
.join("");
</script>
</body>
</html>