This repository has been archived by the owner on Jun 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlogging.htm
80 lines (80 loc) · 4.76 KB
/
logging.htm
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
<!DOCTYPE HTML>
<html>
<head>
<style>
@font-face{
font-family:'arimo';font-weight:normal;font-style:normal;
src:url('/webGui/styles/arimo.eot');src:url('/webGui/styles/arimo.eot?#iefix') format('embedded-opentype'),url('/webGui/styles/arimo.woff') format('woff'),url('/webGui/styles/arimo.ttf') format('truetype'),url('/webGui/styles/arimo.svg#arimo') format('svg');
}
@font-face{
font-family:'arimo';font-weight:bold;font-style:normal;
src:url('/webGui/styles/arimo-bold.eot');src:url('/webGui/styles/arimo-bold.eot?#iefix') format('embedded-opentype'),url('/webGui/styles/arimo-bold.woff') format('woff'),url('/webGui/styles/arimo-bold.ttf') format('truetype'),url('/webGui/styles/arimo-bold.svg#arimo-bold') format('svg');
}
@font-face{
font-family:'arimo';font-weight:normal;font-style:italic;
src:url('/webGui/styles/arimo-italic.eot');src:url('/webGui/styles/arimo-italic.eot?#iefix') format('embedded-opentype'),url('/webGui/styles/arimo-italic.woff') format('woff'),url('/webGui/styles/arimo-italic.ttf') format('truetype'),url('/webGui/styles/arimo-italic.svg#arimo-italic') format('svg');
}
@font-face{
font-family:'arimo';font-weight:bold;font-style:italic;
src:url('/webGui/styles/arimo-bold-italic.eot');src:url('/webGui/styles/arimo-bold-italic.eot?#iefix') format('embedded-opentype'),url('/webGui/styles/arimo-bold-italic.woff') format('woff'),url('/webGui/styles/arimo-bold-italic.ttf') format('truetype'),url('/webGui/styles/arimo-bold-italic.svg#arimo-bold-italic') format('svg');
}
@font-face{
font-family:'bitstream';font-weight:normal;font-style:normal;
src:url('/webGui/styles/bitstream.eot');src:url('/webGui/styles/bitstream.eot?#iefix') format('embedded-opentype'),url('/webGui/styles/bitstream.woff') format('woff'),url('/webGui/styles/bitstream.ttf') format('truetype'),url('/webGui/styles/bitstream.svg#bitstream') format('svg');
}
.logLine{font-family:bitstream;font-size:10px;color:#505050;margin:0 8px;padding:0;}
.logLine.spacing{margin:10px;}
button[type=button],a.button{font-family:arimo;font-size:11px;position:relative;display:inline-block;padding:5px 10px;border:1px solid #E8E8E8;border-radius:5px;margin:7px 14px 0 0;text-decoration:none;white-space:nowrap;cursor:pointer;outline:none;color:#303030;background:-webkit-radial-gradient(#F0F0F0,#C8C8C8);background:linear-gradient(#F0F0F0,#C8C8C8);}
button:hover[type=button],a.button:hover{border-color:#6AB034;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);color:#FFFFFF;background:-webkit-radial-gradient(#5E9E2E,#8FD956);background:linear-gradient(#5E9E2E,#8FD956);}
button:active[type=button]{border-color:#6AB034;box-shadow:inset 0 0 8px 4px #548C29,0 1px 0 0 #E0E0E0;}
p.centered{text-align:center;}
span.error{color:#D8000C;background-color:#FFBABA;display:block;width:100%;}
span.warn{color:#9F6000;background-color:#FEEFB3;display:block;width:100%;}
span.system{color:#00529B;background-color:#BDE5F8;display:block;width:100%;}
span.array{color:#4F8A10;background-color:#DFF2BF;display:block;width:100%;}
span.login{color:#D63301;background-color:#FFCCBA;display:block;width:100%;}
span.label{padding:4px 8px;margin-right:10px;border-radius:4px;display:inline;width:auto;}
</style>
<script>
var progressframe = parent.document.getElementById('progressFrame');
if (progressframe) progressframe.style.zIndex = 10;
var lastLine = 0;
var cursor;
function addLog(logLine) {
var scrollTop = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode).scrollTop;
var clientHeight = (document.documentElement || document.body.parentNode).clientHeight;
var scrollHeight = (document.documentElement || document.body.parentNode).scrollHeight;
var isScrolledToBottom = scrollHeight - clientHeight <= scrollTop + 1;
if (lastLine == 0) {
lastLine = document.body.innerHTML.length;
cursor = lastLine;
}
if (logLine.slice(-1) == "\n") {
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1) + "<br>";
lastLine = document.body.innerHTML.length;
cursor = lastLine;
}
else if (logLine.slice(-1) == "\r") {
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1);
cursor = lastLine;
}
else if (logLine.slice(-1) == "\b") {
if (logLine.length > 1)
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1);
cursor += logLine.length-2;
}
else {
document.body.innerHTML += logLine;
cursor += logLine.length;
}
if (isScrolledToBottom) {
window.scrollTo(0,document.body.scrollHeight);
}
}
function addCloseButton() {
addLog("<p class='centered'><button class='logLine' type='button' onclick='" + (top.Shadowbox ? "top.Shadowbox" : "window") + ".close()'>Done</button></p>");
}
</script>
</head>
<body class="logLine spacing" onload="addCloseButton()"></body>
</html>