summaryrefslogtreecommitdiff
path: root/scripts/gui-common/log.js
diff options
context:
space:
mode:
authorKai Gunger <kgunger12@gmail.com>2025-12-20 17:41:40 -0500
committerKai Gunger <kgunger12@gmail.com>2025-12-20 17:41:40 -0500
commitb86113fcba3c27635ae0ce31f139a1bc11b8a786 (patch)
tree93f380971493f4afda707d5795fbc8606a1c86f0 /scripts/gui-common/log.js
parent0e1d2882487451cb69b31b0a5a09940ea6b6aa2a (diff)
Revert logHEADmain
Diffstat (limited to 'scripts/gui-common/log.js')
-rw-r--r--scripts/gui-common/log.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/scripts/gui-common/log.js b/scripts/gui-common/log.js
deleted file mode 100644
index bc93546..0000000
--- a/scripts/gui-common/log.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-
-const LOG_EL = document.getElementsByTagName("log")[0];
-let LAST_LOG_TYPE = "";
-
-function at_bot(el) {
- return (el.scrollTop + 10) >= (el.scrollHeight - el.clientHeight)
-}
-
-function addLogEntry(object) {
-
- let do_scroll = at_bot(LOG_EL);
-
- let out = {
- type: object.type,
- target: object.target
- };
-
- if (LAST_LOG_TYPE == "mousemove" || LAST_LOG_TYPE == "touchmove") {
- if (LAST_LOG_TYPE == out.type)
- return;
- }
-
- LAST_LOG_TYPE = out.type;
-
- let entry = document.createElement("entry");
- entry.innerText = JSON.stringify(out);
-
- LOG_EL.appendChild(entry);
-
- if (do_scroll) {
- LOG_EL.scroll({
- top: LOG_EL.scrollHeight,
- behavior: "instant",
- });
- }
-} \ No newline at end of file