From 11a0ba27e9fc9b2947f303c66802a89971f34c4d Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 13 Jan 2024 13:25:58 +0000 Subject: [PATCH] [js] have shm_log specifically use a section, like the server-side functions --- ext/static_files/init.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/static_files/init.js b/ext/static_files/init.js index 5cd4e5f8..fe6cabf2 100644 --- a/ext/static_files/init.js +++ b/ext/static_files/init.js @@ -5,11 +5,11 @@ function shm_cookie_get(name) { return Cookies.get(name); } -function shm_log(...message) { - window.dispatchEvent(new CustomEvent("shm_log", {detail: {message: message}})); +function shm_log(section, ...message) { + window.dispatchEvent(new CustomEvent("shm_log", {detail: {section, message}})); } window.addEventListener("shm_log", function (e) { - console.log(...e.detail.message); + console.log(e.detail.section, ...e.detail.message); }); window.addEventListener("error", function (e) { shm_log("Window error:", e.error);