Format switch cases and comment on document.id override

This commit is contained in:
bolshoytoster 2025-05-23 09:17:00 +01:00
commit af5dc4160f

View file

@ -175,6 +175,9 @@ let setStatusFilter = () => {};
let toggleFilterDisplay = () => {}; let toggleFilterDisplay = () => {};
window.addEventListener("DOMContentLoaded", (event) => { window.addEventListener("DOMContentLoaded", (event) => {
// Override MooTools' `document.id` (used for `$(id)`), which prevents it
// from allocating a `uniqueNumber` for elements that don't need it.
// This is also more efficient than the original.
document.id = el => { document.id = el => {
switch (typeOf(el)) { switch (typeOf(el)) {
case "string": case "string":