<commit_before>$(document).ready(function () {
  var socket = io.connect('http://localhost:3000');

  socket.on('messagerecieved', function (message) {
    $('#message-list').append('<li class="list-group-item">' + message + '</li>');
  });

  $('#message-send-button').click(function () {
    socket.emit('messagesent', $('#message-field').val());
    $('#message-field').val('');
  });
});<commit_msg>Add support for sending messages from the text field with "return"<commit_after>$(document).ready(function () {
  var socket = io.connect('http://localhost:3000');

  socket.on('messagerecieved', function (message) {
    $('#message-list').append('<li class="list-group-item">' + message + '</li>');
  });

  function sendMessage() {
    socket.emit('messagesent', $('#message-field').val());
    $('#message-field').val('');
  }

  $('#message-send-button').click(sendMessage);

  $('#message-field').on('keypress', function (event) {
    var returnKey = 13;

    if (event.which === returnKey) {
      sendMessage();
    }
  });
});
{'fraction_non_alphanumeric': 0.2420443587270974, 'fraction_numerical': 0.009643201542912247, 'mean_word_length': 4.40625, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '898164', 'n_tokens_mistral': 329, 'n_tokens_neox': 316, 'n_words': 52}