<commit_before>(function() {
  document.getElementById("nav-toggle").addEventListener("click", function(event) {
    var nav = document.getElementById("nav");
    if (nav.classList.contains("open-nav")) {
      nav.className = nav.className.replace(/\bopen-nav\b/,'');
    } else {
      nav.className = nav.className + "open-nav";
    }
  });

  var getHashParameters = function getHashParameters() {<commit_msg>hide nav on click anywhere<commit_after>(function() {
  function getNav() {
    return document.getElementById("sidebar-content");
  }

  function closeNav(nav) {
    nav.className = nav.className.replace(/\bopen-nav\b/,'');
  };

  document.getElementById("nav-toggle")
      .addEventListener("click", function(event) {
    var nav = getNav();
    if (nav.classList.contains("open-nav")) {
      closeNav(nav);
    } else {
      nav.className = nav.className + "open-nav";
    }
  });

  document.addEventListener("click", function(event) {
    let target = event.target || event.srcElement;

    let navToggle = document.getElementById("nav-toggle");

    if (!navToggle.isSameNode(target) 
        && !navToggle.contains(target)) {
      closeNav(getNav());
    }
  });

  var getHashParameters = function getHashParameters() {
{'fraction_non_alphanumeric': 0.16224899598393575, 'fraction_numerical': 0.0, 'mean_word_length': 3.5474452554744524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '79574', 'n_tokens_mistral': 367, 'n_tokens_neox': 360, 'n_words': 61}