<commit_before>ko.bindingHandlers.mediaStatus = {
    init: function(element, valueAccessor, allBindingsAccessor) {
        var $icon = $('<i class="icon icon-white"></i>');
        $(element).addClass('label');
        $(element).append($icon);
    },
    update: function(element, valueAccessor, allBindingsAccessor) {
        var value = valueAccessor()() || false,
            $icon = $(element).find('i');

        $(element).removeClass('label-success label-important');
        $icon.removeClass('icon-ok icon-remove');

        if (value) {
            $(element).text(' Found');
            $(element).addClass('label-success');
            $icon.addClass('icon-ok');
        } else {
            $(element).text(' Missing');
            $(element).addClass('label-important');
            $icon.addClass('icon-remove');
        }
        $(element).prepend($icon);
    }
};

ko.bindingHandlers.previewHQImageButton = {
    update: function(element, valueAccessor) {
        var url = valueAccessor()() || "";
        $(element).text('');
        if (!_.isEmpty(url)) {
            var $previewButton = $('<a target="_blank" class="btn btn-info" />');
            $previewButton.attr('href', url);
            $previewButton.text('Preview Image');
            $previewButton.popover({
                title: 'Click to open in new window',
                content: '<img src="'+url+'" alt="preview image" />',
                placement: 'bottom'
            });
            $(element).append($previewButton);
        }
    }
};

ko.bindingHandlers.previewHQAudioButton = {
    update: function(element, valueAccessor, allBindingsAccessor) {
        var url = valueAccessor()() || "",
            params = allBindingsAccessor().previewHQAudioParams,
            is_playing = allBindingsAccessor().HQAudioIsPlaying;



        $(element).text('');
        if (!_.isEmpty(url)) {
            var $previewButton = $('<a target="_blank" class="btn btn-info" />');
            $previewButton.attr('href', url);<commit_msg>small fix to multimedia image popover which a bootstrap update broke<commit_after>ko.bindingHandlers.mediaStatus = {
    init: function(element, valueAccessor, allBindingsAccessor) {
        var $icon = $('<i class="icon icon-white"></i>');
        $(element).addClass('label');
        $(element).append($icon);
    },
    update: function(element, valueAccessor, allBindingsAccessor) {
        var value = valueAccessor()() || false,
            $icon = $(element).find('i');

        $(element).removeClass('label-success label-important');
        $icon.removeClass('icon-ok icon-remove');

        if (value) {
            $(element).text(' Found');
            $(element).addClass('label-success');
            $icon.addClass('icon-ok');
        } else {
            $(element).text(' Missing');
            $(element).addClass('label-important');
            $icon.addClass('icon-remove');
        }
        $(element).prepend($icon);
    }
};

ko.bindingHandlers.previewHQImageButton = {
    update: function(element, valueAccessor) {
        var url = valueAccessor()() || "";
        $(element).text('');
        if (!_.isEmpty(url)) {
            var $previewButton = $('<a target="_blank" class="btn btn-info" />');
            $previewButton.attr('href', url);
            $previewButton.text('Preview Image');
            $previewButton.popover({
                title: 'Click to open in new window',
                content: '<img src="'+url+'" alt="preview image" />',
                html: true,
                placement: 'right',
                trigger: 'hover'
            });
            $(element).append($previewButton);
        }
    }
};

ko.bindingHandlers.previewHQAudioButton = {
    update: function(element, valueAccessor, allBindingsAccessor) {
        var url = valueAccessor()() || "",
            params = allBindingsAccessor().previewHQAudioParams,
            is_playing = allBindingsAccessor().HQAudioIsPlaying;



        $(element).text('');
        if (!_.isEmpty(url)) {
            var $previewButton = $('<a target="_blank" class="btn btn-info" />');
            $previewButton.attr('href', url);
{'fraction_non_alphanumeric': 0.1685878962536023, 'fraction_numerical': 0.0, 'mean_word_length': 2.3240223463687153, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3314701', 'n_tokens_mistral': 1119, 'n_tokens_neox': 1088, 'n_words': 207}