diff --git a/assets/js/main.js b/assets/js/main.js index 92872c6..170c63b 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -31,9 +31,9 @@ // Enable keyboard steering for the navigation menu document.getElementById("menu-icon").addEventListener("keydown", (evt) => { - if (evt.key == "Enter" || evt.key == " ") { + if (evt.key == "Enter" || evt.key == " ") { cbox.checked = !cbox.checked; - } + } }); if (crTypes) { @@ -53,16 +53,16 @@ } } - function loadCodersrank(types) { - const scriptElems = []; - for (type of types) { - const script = document.createElement("script"); - script.src = "https://unpkg.com/@codersrank/activity/codersrank-" + type + ".min.js"; - scriptElems.push(script); - } - for (ph of document.getElementsByClassName("cr-placeholder")) { - ph.parentElement.innerHTML = ph.childNodes[0].data; - } - document.head.append(...scriptElems); - } + function loadCodersrank(types) { + const scriptElems = []; + for (type of types) { + const script = document.createElement("script"); + script.src = "https://unpkg.com/@codersrank/activity/codersrank-" + type + ".min.js"; + scriptElems.push(script); + } + for (ph of document.getElementsByClassName("cr-placeholder")) { + ph.parentElement.innerHTML = ph.childNodes[0].data; + } + document.head.append(...scriptElems); + } })();