<commit_before>$(document).ready(function(){
    $('.overall-table tbody tr').hover(function() {
        var id = $(this).attr("id");
        $(getTeam(id)).addClass('team-hover');
    }, function() {
        var id = $(this).attr("id");
        $(getTeam(id)).removeClass('team-hover');
    });

    $('.overall-table tbody tr').click(function() {
        var selectedClass = 'team-selected';
        var id = $(this).attr("id");

        if(!$(this).hasClass(selectedClass)) {
            $(getTeam(id)).addClass(selectedClass);
        } else {
            $(getTeam(id)).removeClass(selectedClass);
        }
    });

    function getTeam(id) {
        var teamId = id.substring(id.indexOf('-') + 1);
        return ".team-" + teamId;
    }
});

$(document).ready(function(){
    $('.toggle-display').click(function() {
        if($(this).hasClass('showing-power')) {
            $(this).removeClass('showing-power');
            $(this).addClass('showing-record');
            
            document.cookie="PowerPreference=record";
        } else {
            $(this).removeClass('showing-record');
            $(this).addClass('showing-power');

            document.cookie="PowerPreference=power";
        }
        $('.record-visible').toggleClass('hidden');
        $('.power-visible').toggleClass('hidden');
    });

    var preference = document.cookie.replace(/(?:(?:^|.*;\s*)PowerPreference\s*\=\s*([^;]*).*$)|^.*$/, "$1");
    if(preference === 'power') {
        $('.record-visible').addClass('hidden')
        $('.power-visible').removeClass('hidden')
        $('.toggle-display').addClass('showing-power')
        $('.toggle-display').removeClass('showing-record')
    } else {
        $('.power-visible').addClass('hidden')
        $('.record-visible').removeClass('hidden')
        $('.toggle-display').addClass('showing-record')
        $('.toggle-display').removeClass('showing-power')
    }

});
<commit_msg>Fixed issue where user was unintentionally defaulted to the record view.<commit_after>$(document).ready(function(){
    $('.overall-table tbody tr').hover(function() {
        var id = $(this).attr("id");
        $(getTeam(id)).addClass('team-hover');
    }, function() {
        var id = $(this).attr("id");
        $(getTeam(id)).removeClass('team-hover');
    });

    $('.overall-table tbody tr').click(function() {
        var selectedClass = 'team-selected';
        var id = $(this).attr("id");

        if(!$(this).hasClass(selectedClass)) {
            $(getTeam(id)).addClass(selectedClass);
        } else {
            $(getTeam(id)).removeClass(selectedClass);
        }
    });

    function getTeam(id) {
        var teamId = id.substring(id.indexOf('-') + 1);
        return ".team-" + teamId;
    }
});

$(document).ready(function(){
    $('.toggle-display').click(function() {
        if($(this).hasClass('showing-power')) {
            $(this).removeClass('showing-power');
            $(this).addClass('showing-record');
            
            document.cookie="PowerPreference=record";
        } else {
            $(this).removeClass('showing-record');
            $(this).addClass('showing-power');

            document.cookie="PowerPreference=power";
        }
        $('.record-visible').toggleClass('hidden');
        $('.power-visible').toggleClass('hidden');
    });

    var preference = document.cookie.replace(/(?:(?:^|.*;\s*)PowerPreference\s*\=\s*([^;]*).*$)|^.*$/, "$1");
    if(preference === 'power') {
        $('.record-visible').addClass('hidden')
        $('.power-visible').removeClass('hidden')
        $('.toggle-display').addClass('showing-power')
        $('.toggle-display').removeClass('showing-record')
    } else if(preference === 'record') {
        $('.power-visible').addClass('hidden')
        $('.record-visible').removeClass('hidden')
        $('.toggle-display').addClass('showing-record')
        $('.toggle-display').removeClass('showing-power')
    }

});

{'fraction_non_alphanumeric': 0.22436059761965055, 'fraction_numerical': 0.0010129146619397315, 'mean_word_length': 2.613906678865508, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2105627', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1137, 'n_words': 136}