<commit_before>var socket = io();

socket.on('reload', function(data){
    console.log("reloading...");
    location.reload();
});


socket.on('rank', function(data) {
    console.log("rank: " + data.text);
    $("#sidebar_footer_text").html(data.text);
    $("#sidebar_footer_text").addClass("animated bounceIn");

});

socket.on('hide-messages', function(data) {
    $("#mainview_body").fadeOut();
});

socket.on('show-messages', function(data) {
    $("#mainview_body").fadeIn();
});

var redgreen = "color-green color-greener color-greenest color-red color-redder color-reddest";

socket.on('action', function(data) {
    console.log(data);
    if (data.action == 'ignore') {
        $("#"+data.id).attr('data-ignore', data.value);
    }
    if (data.action == 'visible') {
        $("#"+data.id).attr('data-visible', data.value);
        if (data.value == 'hide') {
            $("#"+data.id).hide();
        }
        if (data.value == 'show') {
            $("#"+data.id).show();
        }
    }
    if (data.action == 'class') {
        var classNames = $("#"+data.id).attr("class").toString().split(' ');
        $.each(classNames, function (i, className) {
            if (className.indexOf('-') > 0 && data.value.indexOf('-') > 0) {
                if (className.substring(0, className.indexOf('-')) == data.value.substring(0, data.value.indexOf('-'))) {
                    $("#"+data.id).removeClass(className);
                }
            }
        });
        $("#"+data.id).addClass(data.value);
    }
    // Fire off any additional specialized components
    $("#"+data.id).trigger('changeData');
});


socket.on('value', function(data) {
    console.log(data);

    if ($("#"+data.id).text() != data.text) {
        $("#"+data.id).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
            $(this).removeClass("animated bounceIn");
        });

        if ($("#"+data.id).hasClass("value")) {
            $("#"+data.id).text(data.text).addClass("animated bounceIn");
        }

        if ($("#"+data.id).hasClass("text")) {
            $("#"+data.id).text(data.text).addClass("animated bounceIn");
        }

        if ($("#"+data.id).hasClass("divimage")) {
            $("#"+data.id).removeClass().addClass("animated bounceIn divimage divimage-"+data.text);
        }

        if ($("#"+data.id).hasClass("linked-picture")) {
            $("#"+data.id).text(properName(data.text)).addClass("animated bounceIn");
            $("#"+data.id.substring(0, data.id.indexOf('-'))+"-picture").removeClass().addClass("animated bounceIn divimage divimage-"+data.text);
            $("#"+data.id.substring(0, data.id.indexOf('-'))+"-picture").one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
                $(this).removeClass("animated bounceIn");
            });
        }

        if ($("#"+data.id).hasClass("progress-bar")) {
            $("#"+data.id).css("width", data.text + "%");<commit_msg>fix subtitles to use html vs text<commit_after>var socket = io();

socket.on('reload', function(data){
    console.log("reloading...");
    location.reload();
});


socket.on('rank', function(data) {
    console.log("rank: " + data.text);
    $("#sidebar_footer_text").html(data.text);
    $("#sidebar_footer_text").addClass("animated bounceIn");

});

socket.on('hide-messages', function(data) {
    $("#mainview_body").fadeOut();
});

socket.on('show-messages', function(data) {
    $("#mainview_body").fadeIn();
});

var redgreen = "color-green color-greener color-greenest color-red color-redder color-reddest";

socket.on('action', function(data) {
    console.log(data);
    if (data.action == 'ignore') {
        $("#"+data.id).attr('data-ignore', data.value);
    }
    if (data.action == 'visible') {
        $("#"+data.id).attr('data-visible', data.value);
        if (data.value == 'hide') {
            $("#"+data.id).hide();
        }
        if (data.value == 'show') {
            $("#"+data.id).show();
        }
    }
    if (data.action == 'class') {
        var classNames = $("#"+data.id).attr("class").toString().split(' ');
        $.each(classNames, function (i, className) {
            if (className.indexOf('-') > 0 && data.value.indexOf('-') > 0) {
                if (className.substring(0, className.indexOf('-')) == data.value.substring(0, data.value.indexOf('-'))) {
                    $("#"+data.id).removeClass(className);
                }
            }
        });
        $("#"+data.id).addClass(data.value);
    }
    // Fire off any additional specialized components
    $("#"+data.id).trigger('changeData');
});


socket.on('value', function(data) {
    console.log(data);

    if ($("#"+data.id).text() != data.text) {
        $("#"+data.id).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
            $(this).removeClass("animated bounceIn");
        });

        if ($("#"+data.id).hasClass("value")) {
            $("#"+data.id).text(data.text).addClass("animated bounceIn");
        }

        if ($("#"+data.id).hasClass("text")) {
            $("#"+data.id).text(data.text).addClass("animated bounceIn");
        }

        if ($("#"+data.id).hasClass("html")) {
            $("#"+data.id).html(data.text).addClass("animated bounceIn");
        }

        if ($("#"+data.id).hasClass("divimage")) {
            $("#"+data.id).removeClass().addClass("animated bounceIn divimage divimage-"+data.text);
        }

        if ($("#"+data.id).hasClass("linked-picture")) {
            $("#"+data.id).text(properName(data.text)).addClass("animated bounceIn");
            $("#"+data.id.substring(0, data.id.indexOf('-'))+"-picture").removeClass().addClass("animated bounceIn divimage divimage-"+data.text);
            $("#"+data.id.substring(0, data.id.indexOf('-'))+"-picture").one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
                $(this).removeClass("animated bounceIn");
            });
        }

        if ($("#"+data.id).hasClass("progress-bar")) {
            $("#"+data.id).css("width", data.text + "%");
{'fraction_non_alphanumeric': 0.22828904731043423, 'fraction_numerical': 0.0019442644199611147, 'mean_word_length': 2.7824754901960786, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1656638', 'n_tokens_mistral': 1881, 'n_tokens_neox': 1871, 'n_words': 266}