<commit_before>/**
 * @file
 * Set-up main menu as a mobile-style burger menu.
 */

(function ($) {
  $(document).ready(function() {

    // Initialize.
    var menuDisplayed = false;
    $('#main-menu nav').hide();

    // Add the open/close behaviour.
    $('#main-menu-button')
      .attr('aria-controls', 'main-menu-nav')
      .attr('aria-expanded', false)
      .keypress( function(event) {
        // Only respond to enter or spacebar keys
        if (event.which == 13 || event.which == 32) {
          // Spacebar usually triggers page scrolling.
          event.preventDefault();
          $(this).trigger('click');
        }
      })
      .click(function(event) {
        if (menuDisplayed === true) {
          $(this).attr('aria-expanded', false)
          $('#main-menu nav').hide();
          menuDisplayed = false;
        }
        else {
          $(this).attr('aria-expanded', true)
          $('#main-menu nav').show();
          menuDisplayed = true;
        }
      });
  });
})(jQuery);<commit_msg>BUGFIX - Removed redundant keypress detection JS logic.<commit_after>/**
 * @file
 * Set-up main menu as a mobile-style burger menu.
 */

(function ($) {
  $(document).ready(function() {

    // Initialize.
    var menuDisplayed = false;
    $('#main-menu nav').hide();

    // Add the open/close behaviour.
    $('#main-menu-button')
      .attr('aria-controls', 'main-menu-nav')
      .attr('aria-expanded', false)
      .click(function(event) {
        if (menuDisplayed === true) {
          $(this).attr('aria-expanded', false)
          $('#main-menu nav').hide();
          menuDisplayed = false;
        }
        else {
          $(this).attr('aria-expanded', true)
          $('#main-menu nav').show();
          menuDisplayed = true;
        }
      });
  });
})(jQuery);
{'fraction_non_alphanumeric': 0.1811634349030471, 'fraction_numerical': 0.00221606648199446, 'mean_word_length': 2.020066889632107, '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': '2589588', 'n_tokens_mistral': 543, 'n_tokens_neox': 536, 'n_words': 116}