<commit_before>(function ($) {
    // Launch Mendeley Web Importer
    $(function () {
        $('.save-to-mendeley').click(function () {
            var script = document.createElement('script')
            script.setAttribute('src','https://www.mendeley.com/minified/bookmarklet.js');
            $('body').append(script);
            return false;
        });
    });
    
    // Use Mendeley API
    $(function () {
        $('.save-to-mendeley-api').click(function () {
            $('#mendeley-modal').modal('show');
            params = $(this).data('document') ? '/' + $(this).data('document') : location.search
            $('#mendeley-modal #mendeley-iframe').attr('src', location.origin + '/mendeley' + params);
            return false;
        });
    });
})(jQuery);
<commit_msg>Ensure that mendeley handler is attached to dynamically loaded tag controls. Refs #1738.<commit_after>(function ($) {
    // Launch Mendeley Web Importer
    $(function () {
        $('body').on('click', '.save-to-mendeley', function () {
            var script = document.createElement('script')
            script.setAttribute('src','https://www.mendeley.com/minified/bookmarklet.js');
            $('body').append(script);
            return false;
        });
    });
    
    // Use Mendeley API
    $(function () {
        $('body').on('click', '.save-to-mendeley-api', function () {
            $('#mendeley-modal').modal('show');
            params = $(this).data('document') ? '/' + $(this).data('document') : location.search
            $('#mendeley-modal #mendeley-iframe').attr('src', location.origin + '/mendeley' + params);
            return false;
        });
    });
})(jQuery);

{'fraction_non_alphanumeric': 0.19715808170515098, 'fraction_numerical': 0.002368265245707519, 'mean_word_length': 2.294346978557505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '2344151', 'n_tokens_mistral': 504, 'n_tokens_neox': 485, 'n_words': 80}