<commit_before>var SnapController = (function() {

  $.notify.defaults({ className: "success" });

  var local = {};

  function SnapController() {}

  SnapController.prototype.init = function() {
    local.eventListeners();
  }

  local.eventListeners = function() {
    $("#snapForm").on("submit", function(e) {

      // Prevents page reload
      e.preventDefault();
      var data = $(this).serializeArray();
      Game.player.addWord(data[0].value);
      Game.sendWord(data[0].value);

    });<commit_msg>Empty the input fiend after the word is submitted<commit_after>var SnapController = (function() {

  $.notify.defaults({ className: "success" });

  var local = {};

  function SnapController() {}

  SnapController.prototype.init = function() {
    local.eventListeners();
  }

  local.eventListeners = function() {
    $("#snapForm").on("submit", function(e) {

      // Prevents page reload
      e.preventDefault();
      var data = $(this).serializeArray();
      Game.player.addWord(data[0].value);
      Game.sendWord(data[0].value);

      // Empty the input field
      $('input[name=snap_input]').val('');

    });
{'fraction_non_alphanumeric': 0.17092511013215858, 'fraction_numerical': 0.003524229074889868, 'mean_word_length': 3.2867924528301886, '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': '3715454', 'n_tokens_mistral': 347, 'n_tokens_neox': 330, 'n_words': 65}