mirror of
https://github.com/tchartron/blow
synced 2025-02-17 05:38:26 +00:00
Because some UI elements are optional, code assuming they always exist was causing some of the JS to fail. Notably, the mobile menu was inoperable unless the '...' sidebar was enabled, since trying to add a listener to the non-existent sidebar button would error out the JS function before it could add the listener for the mobile menu. Same changes included in the minified js.
1 line
No EOL
230 B
JavaScript
1 line
No EOL
230 B
JavaScript
function switchLang(n){document.getElementById("switch-lang-panel").classList.toggle("hidden")}document.addEventListener("DOMContentLoaded",function(){document.getElementById("switch-lang")?.addEventListener("click",switchLang)}); |