aboutsummaryrefslogtreecommitdiff
path: root/ui/client-scripts/src/log_live.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-02-20 01:23:38 +0100
committermetamuffin <metamuffin@disroot.org>2026-02-20 01:23:38 +0100
commit5caf1f1db721d6dee2ddb5d0613e8c9914ccf879 (patch)
tree7816c2a9e1a5222f8068ab2cf941df55743ba6d3 /ui/client-scripts/src/log_live.ts
parent62984a7250c8998556e0258d67964e8e481b243c (diff)
downloadjellything-5caf1f1db721d6dee2ddb5d0613e8c9914ccf879.tar
jellything-5caf1f1db721d6dee2ddb5d0613e8c9914ccf879.tar.bz2
jellything-5caf1f1db721d6dee2ddb5d0613e8c9914ccf879.tar.zst
admin log
Diffstat (limited to 'ui/client-scripts/src/log_live.ts')
-rw-r--r--ui/client-scripts/src/log_live.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/client-scripts/src/log_live.ts b/ui/client-scripts/src/log_live.ts
index b8af11e..d16553c 100644
--- a/ui/client-scripts/src/log_live.ts
+++ b/ui/client-scripts/src/log_live.ts
@@ -5,8 +5,8 @@
*/
/// <reference lib="dom" />
globalThis.addEventListener("DOMContentLoaded", () => {
- if (!document.body.classList.contains("admin_log")) return
- const log = document.getElementById("log")!
+ const log = document.getElementById("log")
+ if (!log) return
const warnonly = new URL(globalThis.location.href).searchParams.get("warnonly") == "true"
const ws = new WebSocket(`/admin/log?stream&warnonly=${warnonly}&html=true`)