-
Notifications
You must be signed in to change notification settings - Fork 47
/
log.html
65 lines (53 loc) · 1.38 KB
/
log.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
<html><header><style>
body, table { font: 8pt Arial; margin: 0px; border: 3px inset lightgrey; }
img.snapshot { border: 1px outset grey; }
div.complete { color: darkgreen; }
div.active { color: orange; }
@media (prefers-color-scheme: dark) {
body { background: #292A30; color: #DFDFE0; }
}
</style><script>
function $(id) {
return id ? document.getElementById(id) : $('macro');
}
function logSet( html ) {
$().innerHTML = " "+html;
}
var id = 0;
function logAdd( entry ) {
var div = document.createElement("div");
if ( entry.match( /^Ended / ) )
entry += "<p>";
div.innerHTML = " "+entry;
div.id = ++id;
$().appendChild(div);
scrollTo(0,1000000);
}
var prevID, divIDs;
function logAnimate( divID ) {
if ( !prevID )
divIDs = [];
else
$(prevID).className = "complete";
if ( divID == "" )
divID = null;
if ( divID ) {
$(divID).className = "active";
divIDs.push(divID);
}
else {
for ( var i=0 ; i<divIDs.length ; i++ )
$(divIDs[i]).className = "";
ids = null;
}
prevID = divID;
}
function logUpdate( divID, snapshotHTML ) {
$(divID).innerHTML = snapshotHTML;
}
function showSnapshot(img) {
prompt("snapshot",img.parentElement.children[2].innerText);
}
</script></header><body><div id='macro'>
This area is fully editable and can be annotated.
</div>