<commit_before>function eventListener(port){
    var progress = document.querySelector("progress");
    var info = document.getElementById("info");
    port.onMessage.addListener(function(msg){
        if(msg.err) {
            info.innerText = msg.err;
            return;
        }
        
        progress.value = ~~(msg.progress * 100);
        console.log(progress.value);
        if(progress.value < 100){
            info.innerText = "Now Loading... " + progress.value + "%";
        } else {
            info.innerText = "Complete!";
        }
    });
    chrome.extension.onConnect.removeListener(eventListener);
};

chrome.extension.onConnect.addListener(eventListener);<commit_msg>Small fix<commit_after>function eventListener(port){
    var progress = document.querySelector("progress");
    var info = document.getElementById("info");
    port.onMessage.addListener(function(msg){
        if(msg.err) {
            info.innerText = msg.err;
            return;
        }
        
        progress.value = ~~(msg.progress * 100);
        console.log(progress.value);
        if(progress.value < 100){
            info.innerText = "Now Loading... " + progress.value + "%";
        } else {
            info.innerText = "Complete!";
        }
    });
    chrome.extension.onConnect.removeListener(eventListener);
}

chrome.extension.onConnect.addListener(eventListener);
{'fraction_non_alphanumeric': 0.13685734974656047, 'fraction_numerical': 0.008689355539464157, 'mean_word_length': 2.370731707317073, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2179427', 'n_tokens_mistral': 390, 'n_tokens_neox': 377, 'n_words': 56}