kopia lustrzana https://github.com/RootMyTV/RootMyTV.github.io
Chronological logging with auto-scroll
rodzic
b1ec45786f
commit
81ce04510c
|
@ -147,7 +147,8 @@ window.requestAnimationFrame(animate_tick);
|
|||
|
||||
function log(str) {
|
||||
var logBox = document.querySelector('#log');
|
||||
logBox.innerText = str + '\n' + logBox.innerText;
|
||||
logBox.innerText = logBox.innerText + str + '\n';
|
||||
logBox.scrollIntoView(false)
|
||||
}
|
||||
|
||||
// Minimal implementation of WebSocket API that we use to workaround origin
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
<script>
|
||||
function log(str) {
|
||||
var logBox = document.querySelector('#log');
|
||||
logBox.innerText = str + '\n' + logBox.innerText;
|
||||
logBox.innerText = logBox.innerText + str + '\n';
|
||||
logBox.scrollIntoView(false)
|
||||
}
|
||||
|
||||
window.onerror = function (err) {log('Unexpected error: ' + err);};
|
||||
|
|
Ładowanie…
Reference in New Issue