script tags should work in the motd as well

This commit is contained in:
Elijah R 2023-12-03 23:05:38 -05:00
parent 3c0b444bc5
commit f99e8bdb2e

View File

@ -679,13 +679,13 @@ function chatMessage(user, msg) {
}
else userclass = "text-light";
td.innerHTML = `<b class="${userclass}">${user}&gt;</b> ${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);
}