<commit_before>$(function () {

    // Toggle modals.
    $('[data-toggle="modal"][href]').unbind().click(function (e) {

        e.preventDefault();

        $($(e.target).data('target')).appendTo('body').find('.modal-content').load(encodeURI($(e.target).attr('href')));
    });

    // Clear remote modals when closed.
    $('.modal.remote').on('hidden.bs.modal', function () {
        $(this).find('.modal-content').html('<div class="modal-loading"><div class="active loader"></div></div>');
    });
});<commit_msg>More elegant remote modal loading<commit_after>$(function () {

    // Clear remote modals when closed.
    $('.modal.remote').on('hidden.bs.modal', function () {

        $(this).find('.modal-content').html('<div class="modal-loading"><div class="active loader"></div></div>');

        $(this).removeData('bs.modal');
    });
});
{'fraction_non_alphanumeric': 0.25206124852767964, 'fraction_numerical': 0.0, 'mean_word_length': 3.67032967032967, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '5080497', 'n_tokens_mistral': 259, 'n_tokens_neox': 253, 'n_words': 35}