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) {
|
function log(str) {
|
||||||
var logBox = document.querySelector('#log');
|
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
|
// Minimal implementation of WebSocket API that we use to workaround origin
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
<script>
|
<script>
|
||||||
function log(str) {
|
function log(str) {
|
||||||
var logBox = document.querySelector('#log');
|
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);};
|
window.onerror = function (err) {log('Unexpected error: ' + err);};
|
||||||
|
|
Ładowanie…
Reference in New Issue