<commit_before>var firebase = new Firebase('https://thebluealliance.firebaseio.com/notifications/');
var maxNumCards = 100;
var numToAnimate = 3; // How many cards to animate
var earliestKey = null;
var visibleTypes = {'favorite_teams_only': true};  // default = visible

$(window).load(function() {
    $('#ticker-filter').click(function() {
        $('#ticker-filter-options').slideToggle();
    });

    firebase.limitToLast(maxNumCards).on('child_added', function(childSnapshot) {
        var card = buildNotificationCard(childSnapshot.val());
        $('#ticker-notifications').prepend(card);
        var len = $('#ticker-notifications').length;
        if (len > maxNumCards) {
            $('#ticker-notifications').children()[len-1].remove();
        }
        updateVisibility(card, card.attr('data-type'));

        if (earliestKey == null || childSnapshot.key() < earliestKey) {
            earliestKey = childSnapshot.key();
        }
    });

    // Show/hide notification types based on checkboxes
    $('input[type="checkbox"]').click(function(){
        var type = $(this).attr("value");
        if (type in visibleTypes) {
            visibleTypes[type] = !visibleTypes[type];
        } else {
            visibleTypes[type] = false;
        }
        updateAllTickerCards();
    });
});

function favoriteTeamsOff() {
    visibleTypes['favorite_teams_only'] = false;
    $('#favorite-teams-only').attr('checked', false);
}

function updateFavMatchOutline() {
    var favTeamNums = getFavoriteTeamNums();
    $('.team-cell').each(function (){
        var hasFav = false;<commit_msg>fix max cards bug<commit_after>var firebase = new Firebase('https://thebluealliance.firebaseio.com/notifications/');
var maxNumCards = 100;
var numToAnimate = 3; // How many cards to animate
var earliestKey = null;
var visibleTypes = {'favorite_teams_only': true};  // default = visible

$(window).load(function() {
    $('#ticker-filter').click(function() {
        $('#ticker-filter-options').slideToggle();
    });

    firebase.limitToLast(maxNumCards).on('child_added', function(childSnapshot) {
        var card = buildNotificationCard(childSnapshot.val());
        $('#ticker-notifications').prepend(card);
        var len = $('#ticker-notifications').children().length;
        if (len > maxNumCards) {
            $('#ticker-notifications').children()[len-1].remove();
        }
        updateVisibility(card, card.attr('data-type'));

        if (earliestKey == null || childSnapshot.key() < earliestKey) {
            earliestKey = childSnapshot.key();
        }
    });

    // Show/hide notification types based on checkboxes
    $('input[type="checkbox"]').click(function(){
        var type = $(this).attr("value");
        if (type in visibleTypes) {
            visibleTypes[type] = !visibleTypes[type];
        } else {
            visibleTypes[type] = false;
        }
        updateAllTickerCards();
    });
});

function favoriteTeamsOff() {
    visibleTypes['favorite_teams_only'] = false;
    $('#favorite-teams-only').attr('checked', false);
}

function updateFavMatchOutline() {
    var favTeamNums = getFavoriteTeamNums();
    $('.team-cell').each(function (){
        var hasFav = false;
{'fraction_non_alphanumeric': 0.16277622159975103, 'fraction_numerical': 0.003112356053532524, 'mean_word_length': 3.1470967741935483, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '2755233', 'n_tokens_mistral': 946, 'n_tokens_neox': 940, 'n_words': 170}