From f99e8bdb2e6d6a1e2314df31f47a37b042652680 Mon Sep 17 00:00:00 2001 From: Elijah R Date: Sun, 3 Dec 2023 23:05:38 -0500 Subject: [PATCH] script tags should work in the motd as well --- src/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/index.js b/src/index.js index cd4da95..e71a80e 100644 --- a/src/index.js +++ b/src/index.js @@ -679,13 +679,13 @@ function chatMessage(user, msg) { } else userclass = "text-light"; td.innerHTML = `${user}> ${msg}`; - // I really hate this but html5 cockblocks me every other way - Array.prototype.slice.call(td.children).forEach((curr) => { - if (curr.nodeName === "SCRIPT") { - eval(curr.text) - } - }); } + // I really hate this but html5 cockblocks me every other way + Array.prototype.slice.call(td.children).forEach((curr) => { + if (curr.nodeName === "SCRIPT") { + eval(curr.text) + } + }); tr.appendChild(td); chatList.appendChild(tr); }