script tags should work in the motd as well
This commit is contained in:
parent
3c0b444bc5
commit
f99e8bdb2e
12
src/index.js
12
src/index.js
|
|
@ -679,13 +679,13 @@ function chatMessage(user, msg) {
|
||||||
}
|
}
|
||||||
else userclass = "text-light";
|
else userclass = "text-light";
|
||||||
td.innerHTML = `<b class="${userclass}">${user}></b> ${msg}`;
|
td.innerHTML = `<b class="${userclass}">${user}></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);
|
tr.appendChild(td);
|
||||||
chatList.appendChild(tr);
|
chatList.appendChild(tr);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user