<commit_before>$(function zeroclipboardInit() {
    'use strict';

    // check if ZeroClipboard is loaded and if the HTML init class is defined
    if (!window.ZeroClipboard || !$('.zeroclipboard-init').length) { return; }

    ZeroClipboard.config({'swfPath': Indico.Urls.Base + '/js/lib/zeroclipboard/ZeroClipboard.swf'});

    // register i-has-action-clip ZeroClipboard handling
    var $iHasAction = $('.i-has-action.i-has-action-clip > .i-button');
    if ($iHasAction.length) {
        ZeroClipboard.on('ready', function() {
            var client = new ZeroClipboard($iHasAction);
            client.on('error', function() { client.destroy(); });

            client.on('ready', function() {
                client.on('copy', function(event) {
                    event.clipboardData.setData('text/plain', $(event.target).siblings('input').val());
                });
                client.on('aftercopy', function(event) {
                    $(event.target).parent().siblings('.i-has-action-message')
                        .css('visibility', 'visible')
                        .fadeTo(50, 1)
                        .fadeTo(1500, 0)
                        .animate({'visibility': 'hidden'}, 0); // animate to have css queued after fadeOut
                });
            });
        });
    }

    $(document).one('mouseover', '.zeroclipboard-init', function loadZeroClipBoardFlash() {
        ZeroClipboard.create(); // loads the Flash file
    });
});
<commit_msg>Allow zeroclipboard triggers to be updated<commit_after>(function(global) {

    var client = null;

    global.zeroclipboardInit = function() {
        'use strict';

        // check if ZeroClipboard is loaded and if the HTML init class is defined
        if (!window.ZeroClipboard || !$('.zeroclipboard-init').length) { return; }

        ZeroClipboard.config({'swfPath': Indico.Urls.Base + '/js/lib/zeroclipboard/ZeroClipboard.swf'});

        // register i-has-action-clip ZeroClipboard handling
        var $iHasAction = $('.i-has-action.i-has-action-clip > .i-button');
        if ($iHasAction.length) {
            ZeroClipboard.on('ready', function() {
                client = new ZeroClipboard($iHasAction);
                client.on('error', function() { client.destroy(); });

                client.on('ready', function() {
                    client.on('copy', function(event) {
                        event.clipboardData.setData('text/plain', $(event.target).siblings('input').val());
                    });
                    client.on('aftercopy', function(event) {
                        $(event.target).parent().siblings('.i-has-action-message')
                            .css('visibility', 'visible')
                            .fadeTo(50, 1)
                            .fadeTo(1500, 0)
                            .animate({'visibility': 'hidden'}, 0); // animate to have css queued after fadeOut
                    });
                });
            });
        }
    };

    global.zeroclipboardRegister = function(element) {
        client.clip(element);
    };

})(window);


$(function() {
    zeroclipboardInit();

    $(document).one('mouseover', '.zeroclipboard-init', function loadZeroClipBoardFlash() {
        ZeroClipboard.create(); // loads the Flash file
    });
});

{'fraction_non_alphanumeric': 0.15421979356405585, 'fraction_numerical': 0.00546448087431694, 'mean_word_length': 1.9367201426024956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5615775', 'n_tokens_mistral': 962, 'n_tokens_neox': 883, 'n_words': 168}