<commit_before>﻿(function(){

    $(function () {
        window.rpc.run(onConnected, onResponse, onDisconnected);

        function onConnected() {
            $('#banner').removeClass('offline').addClass('online');
            $('#title').text('Scrutiny - started');
        }

        function onResponse(commands) {
            console.log('RPC got response');
            debugger;
            console.log(commands);
        }

        function onDisconnected() {
            $('#banner').removeClass('online').addClass('offline');
            $('#title').text('Scrutiny - stopped');<commit_msg>Scrutiny displays connected browsers.<commit_after>﻿(function(){

    $(function () {
        window.rpc.run(onConnected, onResponse, onDisconnected);

        function onConnected() {
            $('#banner').removeClass('offline').addClass('online');
            $('#title').text('Scrutiny - started');
        }

        function onDisconnected() {
            $('#banner').removeClass('online').addClass('offline');
            $('#title').text('Scrutiny - stopped');
        }

        function onResponse(commands) {
            $.each(commands, function () {
                switch (this.Name) {
                    case 'Clients': onClientsUpdate(this.Data); break;
                    default:
                        console.error('Unsupported command: ' + this.Name);
                        console.log(this.Data);
                        break;
                }
            });
        }

        function onClientsUpdate(data) {
            var html = data.map(function (browser) {
                return '<li>' + browser + '</li>';
            });
            $('#browsers').html(html);
{'fraction_non_alphanumeric': 0.15746180963572268, 'fraction_numerical': 0.0, 'mean_word_length': 1.7826797385620916, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7127270', 'n_tokens_mistral': 431, 'n_tokens_neox': 421, 'n_words': 66}