<commit_before>:javascript
  $(document).ready(function () {
    $('.error').hide();

    $('#team_number_box').focus(function () {
      $(this).val('');
      $('#team_number_combobox').val('Select...');
    });

    $('#team_number_box').blur(function () {
      if($(this).val() == '') {
        $(this).val('Enter team number');
        $('#team_number_combobox').val('Select...');
      }
    });

    $('#team_number_combobox').change(function () {
      $('#team_number_box').val('Enter team number');
    });

    $('#team_number_combobox').blur(function () {
      $('#team_number_box').val('Enter team number');
    });

    $('#team_number_button').bind('click', function () {
      var team_url;
      if ($('#team_number_combobox').val() == 'Select...') {
        team_url = document.location.pathname + '/team/' + $('#team_number_box').val();
        alert(team_url);
      }
      else if ($('#team_number_box').val() == 'Enter team number') {
        team_url = document.location.pathname + '/team/' + $('#team_number_combobox option:selected').text();
      }
      alert(team_url);
      document.location.href = team_url;
    });

    $('.pressable').keypress(function (e) {
      var k = e.keyCode || e.which;
      if(k == 13) {
        $('#team_number_button').click();
      }
    });
  });

%h3= @event
.error Please enter a team number.
%input{:type => 'textbox', :id => 'team_number_box', :value => 'Enter team number', :onkeydown => ''}
or
%select{:id => 'team_number_combobox', :class => 'pressable'}
  %option Select...
  - @team_numbers.sort!
  - @team_numbers.each do |i|
    %option= i
%input{:id => 'team_number_button', :class => 'pressable', :type => 'button', :value => 'Go'}
<commit_msg>Keybindings work<commit_after>:javascript
  $(document).ready(function () {
    function checkForEnter(e) {
      if(e.keyCode == 13) {
        var team_url;
        if ($('#team_number_combobox').val() == 'Select...') {
          team_url = document.location.pathname + '/team/' + $('#team_number_box').val();
        }
        else if ($('#team_number_box').val() == 'Enter team number') {
          team_url = document.location.pathname + '/team/' + $('#team_number_combobox option:selected').text();
        }
        document.location.href = team_url;
      }
    }

    $('.error').hide();

    $('#team_number_box').focus(function () {
      $(this).val('');
      $('#team_number_combobox').val('Select...');
    });

    $('#team_number_box').blur(function () {
      if($(this).val() == '') {
        $(this).val('Enter team number');
        $('#team_number_combobox').val('Select...');
      }
    });

    $('#team_number_combobox').change(function () {
      $('#team_number_box').val('Enter team number');
    });

    $('#team_number_combobox').blur(function () {
      $('#team_number_box').val('Enter team number');
    });

    $('#team_number_button').bind('click', function () {
      var team_url;
      if ($('#team_number_combobox').val() == 'Select...') {
        team_url = document.location.pathname + '/team/' + $('#team_number_box').val();
        alert(team_url);
      }
      else if ($('#team_number_box').val() == 'Enter team number') {
        team_url = document.location.pathname + '/team/' + $('#team_number_combobox option:selected').text();
      }
      alert(team_url);
      document.location.href = team_url;
    });

    $('#team_number_box').keydown(checkForEnter);

    $('.pressable').keypress(function (e) {
      var k = e.keyCode || e.which;
      if(k == 13) {
        $('#team_number_button').click();
      }
    });
  });

%h3= @event
.error Please enter a team number.
%input{:type => 'textbox', :id => 'team_number_box', :value => 'Enter team number'}
or
%select{:id => 'team_number_combobox', :class => 'pressable'}
  %option Select...
  - @team_numbers.sort!
  - @team_numbers.each do |i|
    %option= i
%input{:id => 'team_number_button', :class => 'pressable', :type => 'button', :value => 'Go'}

{'fraction_non_alphanumeric': 0.22149673530889, 'fraction_numerical': 0.0020090406830738324, 'mean_word_length': 3.019172552976791, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 22, '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': '1600127', 'n_tokens_mistral': 1311, 'n_tokens_neox': 1287, 'n_words': 213}