<commit_before>"use strict";

const obSvc = require('sdk/deprecated/observer-service');
const {Connection, allConnections, addConnection } = require('./connection');
const tabEvents = require('./tab/events');
const ui = require('./ui');
const {mainPage, contentScript, attachToCollusionPage } = require('ui');


obSvc.add("http-on-examine-response", function(subject) {
    var connection = Connection.fromSubject(subject);
    if (connection.valid){
        addConnection(connection);
    }
});

tabEvents.on('activate', function(tabinfo){
    var items = currentConnectionsForTab(tabinfo);
    // visualize items if we have a per-tab view
});

Connection.on('log', function(message){
    ui.emit('log', message);
});


function matchesCurrentTab(connection){
    // this is a tabinfo object<commit_msg>Fix for issue #163 Easiest fix ever<commit_after>"use strict";

const obSvc = require('sdk/deprecated/observer-service');
const {Connection, allConnections, addConnection } = require('./connection');
const tabEvents = require('./tab/events');
const ui = require('./ui');
const addontab = require("sdk/addon-page");
const {mainPage, contentScript, attachToCollusionPage } = require('ui');


obSvc.add("http-on-examine-response", function(subject) {
    var connection = Connection.fromSubject(subject);
    if (connection.valid){
        addConnection(connection);
    }
});

tabEvents.on('activate', function(tabinfo){
    var items = currentConnectionsForTab(tabinfo);
    // visualize items if we have a per-tab view
});

Connection.on('log', function(message){
    ui.emit('log', message);
});


function matchesCurrentTab(connection){
    // this is a tabinfo object
{'fraction_non_alphanumeric': 0.15113500597371565, 'fraction_numerical': 0.0017921146953405018, 'mean_word_length': 4.918727915194347, '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': '558669', 'n_tokens_mistral': 481, 'n_tokens_neox': 472, 'n_words': 114}