window.addEventListener("DOMContentLoaded", () => {
    document.getElementById("leftToggler").onclick = function() {
        document.getElementById("leftColumn").classList.toggle("open");
    }
    hljs.registerLanguage('scala', highlightDotty);
    hljs.registerAliases(['dotty', 'scala3'], 'scala');
    hljs.initHighlighting();
  });

window.addEventListener("DOMContentLoaded", () => {
    var e = document.getElementById("leftToggler");
    if (e) {
        e.onclick = function() {
            document.getElementById("leftColumn").classList.toggle("open");
        };
    }
    hljs.registerLanguage('scala', highlightDotty);
    hljs.registerAliases(['dotty', 'scala3'], 'scala');
    hljs.initHighlighting();
  });

Make all Scala snippets highlighted
Make all Scala snippets highlighted

Element with id `leftToggler` doesn't exist on some pages, which could sometimes
throw an error before hljs syntax for Scala is loaded, which prevented it from
working properly.
