♻️ Refactor: Move 2 inline event handlers out of line

If MDN explicitly warns user not to use them, we probably shouldn't.

MDN also states: "Note that inline event handlers are blocked as well[...]You should replace them with addEventListener calls[...]" regarding CSP.
This commit is contained in:
Served Smart committed 2025-06-27 19:23:55 +02:00
1 parent a9aae948eb
commit a34947a630
5 files changed
+20 -10

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
document.getElementById("button_likes") &&
document.getElementById("button_likes").addEventListener("click", () => {
process_article();
});
+4
View File
@@ -0,0 +1,4 @@
document.getElementById("katex-render") &&
document.getElementById("katex-render").addEventListener("load", () => {
renderMathInElement(document.body);
});