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

  $("#button-preview").click(function() {
    $("#preview").show();
    $("form").attr("target", "preview")
    $("form").attr("action", "/render")
  })

  $("#button-create").click(function() {
    $("form").attr("target", "")
    $("form").attr("action", "/create")
  })

  inputRow = '<tr> ' +
            '<td><input type="text" name="description" placeholder="Atomic screwdriver"></td> ' +
            '<td><input type="text" name="tax" value="25%"></td> ' +
            '<td><input type="number" name="value" placeholder="1337"></td> ' +
            '<td><input class="button-primary" name="remove-row" type="button" value="Remove"></td> ' +
          '</tr>';

  function bindRowRemoval() {
    $("input[name='remove-row']").click(function() {
      $(this).parent().parent().remove()
    })
  }

  $("#button-new-row").click(function() {
    $("#invoice-rows").append(inputRow);
    bindRowRemoval()
  })

  $("#invoice-rows").append(inputRow);

  $("#preview").hide()
  bindRowRemoval()
});<commit_msg>JS routes fixed.<commit_after>$(document).ready(function() {

  $("#button-preview").click(function() {
    $("#preview").show();
    $("form").attr("target", "preview")
    $("form").attr("action", "/invoice/render")
  })

  $("#button-create").click(function() {
    $("form").attr("target", "")
    $("form").attr("action", "/invoice/create")
  })

  inputRow = '<tr> ' +
            '<td><input type="text" name="description" placeholder="Atomic screwdriver"></td> ' +
            '<td><input type="text" name="tax" value="25%"></td> ' +
            '<td><input type="number" name="value" placeholder="1337"></td> ' +
            '<td><input class="button-primary" name="remove-row" type="button" value="Remove"></td> ' +
          '</tr>';

  function bindRowRemoval() {
    $("input[name='remove-row']").click(function() {
      $(this).parent().parent().remove()
    })
  }

  $("#button-new-row").click(function() {
    $("#invoice-rows").append(inputRow);
    bindRowRemoval()
  })

  $("#invoice-rows").append(inputRow);

  $("#preview").hide()
  bindRowRemoval()
});
{'fraction_non_alphanumeric': 0.2674473067915691, 'fraction_numerical': 0.005620608899297424, 'mean_word_length': 3.6233766233766236, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '3921284', 'n_tokens_mistral': 687, 'n_tokens_neox': 690, 'n_words': 86}