<commit_before>/* eslint-env browser */
/* global rempl */

rempl.getSubscriber(function(api) {
    var host;

    rempl.createEnv(parent, api.id, function(env) {
        host = env;
        env.connected.link(function(connected) {
            document.getElementById('env').hidden = !connected;
        });
        env.subscribe(function(data) {
            switch (data.type) {
                case 'DidChangeActivePaneItem':
                    if (data.pane.isEditor) {
                        document.getElementById('env').innerHTML += `<li><b>${data.host}:</b> ${data.pane.title} (${data.pane.grammar})</li>`;
                    }
                    break;
            }
        });
    });

    api.subscribe(function(counter) {
        document.getElementById('counter').innerHTML = counter;

        host.send({
            type: 'data',
            data: {
                type: 'setStatusBarContent',
                content: counter
            }
        });
    });<commit_msg>renamed env-var in example/node-ui<commit_after>/* eslint-env browser */
/* global rempl */

rempl.getSubscriber(function(api) {
    var theEnv;

    rempl.createEnv(parent, api.id, function(env) {
        theEnv = env;
        env.connected.link(function(connected) {
            document.getElementById('env').hidden = !connected;
        });
        env.subscribe(function(data) {
            switch (data.type) {
                case 'DidChangeActivePaneItem':
                    if (data.pane.isEditor) {
                        document.getElementById('env').innerHTML += `<li><b>${data.host}:</b> ${data.pane.title} (${data.pane.grammar})</li>`;
                    }
                    break;
            }
        });
    });

    api.subscribe(function(counter) {
        document.getElementById('counter').innerHTML = counter;

        theEnv.send({
            type: 'data',
            data: {
                type: 'setStatusBarContent',
                content: counter
            }
        });
    });
{'fraction_non_alphanumeric': 0.14456035767511177, 'fraction_numerical': 0.0, 'mean_word_length': 1.6121919584954605, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6229367', 'n_tokens_mistral': 564, 'n_tokens_neox': 541, 'n_words': 81}