<commit_before>$(function () {
  $(document).on('click', '.modal a.image', function (e) {
    e.preventDefault();

    var selected_image_id = $(this).data('image');
    var selected_image_url = $(this).data('url')

    $(".image_id_input").val(selected_image_id);
    $('.image-preview').attr('src', selected_image_url);

    $.modal.close();
  });

  $('.choose-image-link').on('click', function(e) {
    e.preventDefault();
    $(this).modal();

    $("html, body").animate({ scrollTop: 0 }, "slow");
  });
});<commit_msg>Make pagination links work inside modal<commit_after>$(function () {
  $(document).on('click', '.modal a.image', function (e) {
    e.preventDefault();

    var selected_image_id = $(this).data('image');
    var selected_image_url = $(this).data('url')

    $(".image_id_input").val(selected_image_id);
    $('.image-preview').attr('src', selected_image_url);

    $.modal.close();
  });

  $(document).on('click', '.modal .pagination a', function(e) {
    e.preventDefault();

    $(".modal").load(this.href).open();
  });

  $('.choose-image-link').on('click', function(e) {
    e.preventDefault();
    $(this).modal();

    $("html, body").animate({ scrollTop: 0 }, "slow");
  });
});
{'fraction_non_alphanumeric': 0.2433993399339934, 'fraction_numerical': 0.0016501650165016502, 'mean_word_length': 3.951020408163265, 'pattern_counts': {'":': 0, '<': 3, '<?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': '249452', 'n_tokens_mistral': 413, 'n_tokens_neox': 397, 'n_words': 64}