<commit_before>
jQuery(document).ready(function($) {

  serchilo_set_input_widths($);

  var that = $;
  jQuery(window).resize(function(that) {
    serchilo_set_input_widths($);
  });

});

function serchilo_set_input_widths($) {

  // Set widths of text inputs.

  // Get current widths.
  var form_width    = $('#serchilo-shortcut-call-form').outerWidth();
  var keyword_width = $('#serchilo-shortcut-call-form div.keyword').outerWidth();
  var submit_width  = $('#edit-submit').outerWidth();

  // Calculate with for single text input.
  var argument_width_total  = form_width - keyword_width - submit_width - 20;
  var argument_count        = $('#serchilo-shortcut-call-form input.form-text').length;
  var argument_width_single = Math.round(argument_width_total / argument_count) - 5;

  // Set widths for all single text inputs.
  $('#serchilo-shortcut-call-form input.form-text').each(function() {
    $(this).outerWidth(argument_width_single);
  });
}<commit_msg>On small screens, set input width to 100%.<commit_after>
jQuery(document).ready(function($) {

  serchilo_set_input_widths($);

  var that = $;
  jQuery(window).resize(function(that) {
    serchilo_set_input_widths($);
  });

});

function serchilo_set_input_widths($) {

  if ($('body').outerWidth() >= 768 ) {

    // Set widths of text inputs.

    // Get current widths.
    var form_width    = $('#serchilo-shortcut-call-form').outerWidth();
    var keyword_width = $('#serchilo-shortcut-call-form div.keyword').outerWidth();
    var submit_width  = $('#edit-submit').outerWidth();

    // Calculate with for single text input.
    var argument_width_total  = form_width - keyword_width - submit_width - 20;
    var argument_count        = $('#serchilo-shortcut-call-form input.form-text').length;
    var argument_width_single = Math.round(argument_width_total / argument_count) - 5;

  }
  else {
    var argument_width_single = '100%';
  }

  // Set widths for all single text inputs.
  $('#serchilo-shortcut-call-form input.form-text').each(function() {
    $(this).outerWidth(argument_width_single);
  });
}
{'fraction_non_alphanumeric': 0.1503831417624521, 'fraction_numerical': 0.007183908045977011, 'mean_word_length': 3.880841121495327, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1071507', 'n_tokens_mistral': 703, 'n_tokens_neox': 667, 'n_words': 130}