<commit_before>﻿var MessageTicker = {};

(function ($, window) {
    var $messageTicker = $('#message-ticker');
    var maxMessages = 5;
    var removeOldMessagesInterval = 5000;  // 5s
    var messageDisplayTime = 25000;  // 25s

    MessageTicker.getMessages = function() {
        return $("li", $messageTicker);
    };

    MessageTicker.appendMessage = function (message, roomName) {
        var $newTickerMessage = $(
            '<li class="appending"><div class="inner">' +
                '#' + roomName + ' ' +
                message.name +
                '<span class="message"> - ' +
                    message.message +
                '</span>' +
            '</div></li>'
        );
        
        if (message.highlight != "") {
            $newTickerMessage.addClass('highlight');
        }

        $newTickerMessage.appendTo($messageTicker);
        $newTickerMessage.data('timestamp', new Date().getTime());

        var $messages = MessageTicker.getMessages();
        var numRemove = $messages.length - maxMessages;<commit_msg>multi-line messages are now hidden from the ticker.<commit_after>﻿var MessageTicker = {};

(function ($, window) {
    var $messageTicker = $('#message-ticker');
    var maxMessages = 5;
    var removeOldMessagesInterval = 5000;  // 5s
    var messageDisplayTime = 25000;  // 25s

    MessageTicker.getMessages = function() {
        return $("li", $messageTicker);
    };

    MessageTicker.appendMessage = function (message, roomName) {
        var isCollapsible = message.message.indexOf('<div class="collapsible_content">') != -1;
        var messageContent = "";
        
        if (!isCollapsible) {
            messageContent = '<span class="message"> - ' + message.message + '</span>';
        }

        var $newTickerMessage = $(
            '<li class="appending"><div class="inner">' +
                '#' + roomName + ' ' +
                message.name +
                messageContent +
            '</div></li>'
        );
        
        if (message.highlight != "") {
            $newTickerMessage.addClass('highlight');
        }

        $newTickerMessage.appendTo($messageTicker);
        $newTickerMessage.data('timestamp', new Date().getTime());

        var $messages = MessageTicker.getMessages();
        var numRemove = $messages.length - maxMessages;
{'fraction_non_alphanumeric': 0.145368782161235, 'fraction_numerical': 0.011578044596912522, 'mean_word_length': 2.1399730820995964, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '6244791', 'n_tokens_mistral': 671, 'n_tokens_neox': 630, 'n_words': 123}