<commit_before>window.addEventListener('click', function(event) {
    var target = event.target;
    
    if (target.id == 'forcarProxy' || target.id == 'listaSites') {
        self.port.emit('daNovoProxy', target.toString());
    }
    
    if (target.id == 'verSites') {
        self.port.emit('openTabSites', target.toString());
    }
    
    if (target.id == 'mensagem') {
        self.port.emit('openTabLink', target.toString());
    }
}, false);

self.on('message', function(data){
    if(data.hasOwnProperty('host') && data.hasOwnProperty('port')) {
       document.getElementById("proxyaddr").innerHTML = data.host + ':' + data.port;
    }
    
    if(data.hasOwnProperty('version')) {
        document.getElementById("ahoy-version").innerHTML = data.version;
    }
})

self.port.on('currentURL', function( currentURL, blockedSites ) {  
    var cleanURL = currentURL.replace(/.*?:\/\/www.|.*?:\/\//g,"").replace(/\//g,"");
    
    if ( blockedSites.indexOf(cleanURL) != -1 ) {
       document.getElementById('status-inactivo').style.display = "none";
       document.getElementById('status-activo').style.display = "";
    } else {
       document.getElementById('status-inactivo').style.display = "";
       document.getElementById('status-activo').style.display = "none";    
   }
});<commit_msg>Remove innerHTML from the code<commit_after>window.addEventListener('click', function(event) {
    var target = event.target;
    
    if (target.id == 'forcarProxy' || target.id == 'listaSites') {
        self.port.emit('daNovoProxy', target.toString());
    }
    
    if (target.id == 'verSites') {
        self.port.emit('openTabSites', target.toString());
    }
    
    if (target.id == 'mensagem') {
        self.port.emit('openTabLink', target.toString());
    }
}, false);

self.on('message', function(data){
    if(data.hasOwnProperty('host') && data.hasOwnProperty('port')) {
       document.getElementById("proxyaddr").firstChild.nodeValue = data.host + ':' + data.port;
    }
    
    if(data.hasOwnProperty('version')) {
        document.getElementById("ahoy-version").firstChild.nodeValue = data.version;
    }
})

self.port.on('currentURL', function( currentURL, blockedSites ) {  
    var cleanURL = currentURL.replace(/.*?:\/\/www.|.*?:\/\//g,"").replace(/\//g,"");

    if ( blockedSites.indexOf(cleanURL) != -1 ) {
       document.getElementById('status-inactivo').style.display = "none";
       document.getElementById('status-activo').style.display = "";
    } else {
       document.getElementById('status-inactivo').style.display = "";
       document.getElementById('status-activo').style.display = "none";    
   }
});
{'fraction_non_alphanumeric': 0.1937429325292122, 'fraction_numerical': 0.0007538635506973238, 'mean_word_length': 3.179527559055118, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1432802', 'n_tokens_mistral': 811, 'n_tokens_neox': 815, 'n_words': 104}