<commit_before>// autofocus polyfill

(function($) {
  if (!("autofocus" in document.createElement("input"))) {
    $("input[autofocus]").first().focus();
  }
})(jQuery);<commit_msg>jQuery independant autofocus polyfill<commit_after>// autofocus polyfill

(function () {
  // Proceed only if new inputs don't have the autofocus property
  if ( document.createElement("input").autofocus === undefined ) {
    // Get a reference to all forms, and an index variable
    var forms = document.forms, fIndex = -1;
    // Begin cycling over all forms in the document
    formloop: while ( ++fIndex < forms.length ) {
      // Reference all elements in form, and an index variable
      var elements = forms[ fIndex ].elements, eIndex = -1;
      // Begin cycling over all elements in collection
      while ( ++eIndex < elements.length ) {
        // Check for the autofocus attribute
        if ( elements[ eIndex ].attributes["autofocus"] ) {
          // If found, trigger focus
          elements[ eIndex ].focus();
          // And break out of outer loop
          break formloop;
        }
      }
    }
  }
}());
{'fraction_non_alphanumeric': 0.12488769092542677, 'fraction_numerical': 0.0017969451931716084, 'mean_word_length': 2.6405228758169934, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1432659', 'n_tokens_mistral': 314, 'n_tokens_neox': 309, 'n_words': 106}