<commit_before>//On page load it selects the default blockchain explorer
(function() {
    refreshBlockchainExplorer();
})();

//Sets the local storage to remember their match favourite blockchain explorer
function toggleBlockchainExplorer() {
    var objBlockchainExplorer = document.getElementById("ext-etheraddresslookup-choose_blockchain");
    localStorage.setItem("ext-etheraddresslookup-blockchain_explorer", objBlockchainExplorer.options[objBlockchainExplorer.selectedIndex].value);
    refreshBlockchainExplorer();
}

function refreshBlockchainExplorer() {
    var strBlockchainExplorer = localStorage.getItem("ext-etheraddresslookup-blockchain_explorer");
    document.getElementById("ext-etheraddresslookup-choose_blockchain").value = strBlockchainExplorer;

    //Notify the tab to do a class method
    var strMethod = "changeBlockchainExplorer";
    chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
        chrome.tabs.sendMessage(tabs[0].id, {
            "func":strMethod
        }, function(response) {
            console.log(response);
        });
    });
}<commit_msg>Sets the default explorer to etherscan for initial install<commit_after>//On page load it selects the default blockchain explorer
(function() {
    refreshBlockchainExplorer();
})();

//Sets the local storage to remember their match favourite blockchain explorer
function toggleBlockchainExplorer() {
    var objBlockchainExplorer = document.getElementById("ext-etheraddresslookup-choose_blockchain");
    localStorage.setItem("ext-etheraddresslookup-blockchain_explorer", objBlockchainExplorer.options[objBlockchainExplorer.selectedIndex].value);
    refreshBlockchainExplorer();
}

function refreshBlockchainExplorer() {
    var strBlockchainExplorer = localStorage.getItem("ext-etheraddresslookup-blockchain_explorer");

    if(strBlockchainExplorer === null) {
        document.getElementById("ext-etheraddresslookup-choose_blockchain").value = "https://etherscan.io/address";
    } else {
        document.getElementById("ext-etheraddresslookup-choose_blockchain").value = strBlockchainExplorer;
    }

    //Notify the tab to do a class method
    var strMethod = "changeBlockchainExplorer";
    chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
        chrome.tabs.sendMessage(tabs[0].id, {
            "func":strMethod
        }, function(response) {
            console.log(response);
        });
    });
}
{'fraction_non_alphanumeric': 0.1053921568627451, 'fraction_numerical': 0.0008169934640522876, 'mean_word_length': 4.629885057471264, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '4708401', 'n_tokens_mistral': 674, 'n_tokens_neox': 628, 'n_words': 127}