aboutsummaryrefslogtreecommitdiff
path: root/ui/client-scripts/src/log_live.ts
diff options
context:
space:
mode:
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`)