<commit_before>function _get(param_name){
  // Gets the correct attribute from the script.
  var scriptElement = document.getElementById('upload_script');

  // Now creates an array with each element.
  return scriptElement.getAttribute(param_name).split(" ");
}

jQuery(document).ready(function(){
  // First, gets the upload id and user id.
  var upload_id = _get('upload_id');
  var button_id = _get('button_id');

  // Ensures only one upload field was entered.
  if (upload_id.size() != 1) return;

  // Checks to see if the file upload id changed.
  jQuery("input#" + upload_id[0]).change(function () {
    var filePath = jQuery(this).val();

    var i;
    // Enables/Disables all buttons.
    for (i = 0; i < button_id.size(); i++) {
      // Either disables or enables upload buttons.
      if (filePath === "") {
        document.getElementById(button_id[i]).disabled = true;
      } else {
        document.getElementById(button_id[i]).disabled = false;
      }
    }
})});
<commit_msg>Removed jQuery call for this.<commit_after>function _get(param_name){
  // Gets the correct attribute from the script.
  var scriptElement = document.getElementById('upload_script');

  // Now creates an array with each element.
  return scriptElement.getAttribute(param_name).split(" ");
}

jQuery(document).ready(function(){
  // First, gets the upload id and user id.
  var upload_id = _get('upload_id');
  var button_id = _get('button_id');

  // Ensures only one upload field was entered.
  if (upload_id.size() != 1) return;

  // Checks to see if the file upload id changed.
  jQuery("input#" + upload_id[0]).change(function () {
    var filePath = this.value;

    var i;
    // Enables/Disables all buttons.
    for (i = 0; i < button_id.size(); i++) {
      // Either disables or enables upload buttons.
      if (filePath === "") {
        document.getElementById(button_id[i]).disabled = true;
      } else {
        document.getElementById(button_id[i]).disabled = false;
      }
    }
})});

{'fraction_non_alphanumeric': 0.13736263736263737, 'fraction_numerical': 0.002997002997002997, 'mean_word_length': 3.190376569037657, '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': '3130225', 'n_tokens_mistral': 606, 'n_tokens_neox': 593, 'n_words': 174}