<commit_before>function doConfig() {
    if (window.location.hostname != "materialscommons.org") {
        if (typeof testconfig != 'undefined') {
            mcglobals.bypasslogin = testconfig.bypasslogin;
            mcglobals.username = testconfig.username;
            mcglobals.apihost = testconfig.apihost;
            mcglobals.apikey = testconfig.apikey;
        }
    }
}
<commit_msg>Change config to remove testconfig. Build url for API from the host we are connecting to.<commit_after>function doConfig() {
    if (window.location.hostname === "test.materialscommons.org") {
        /*
         * test.materialscommons.org doesn't conform to the naming convention so
         * explicitly check for it and set the api path appropriately.
         */
        mcglobals.apihost = "https://apitest.materialscommons.org";
    } else {
        mcglobals.apihost = window.location.protocol + "//api." + window.location.hostname;
    }
}

{'fraction_non_alphanumeric': 0.10615711252653928, 'fraction_numerical': 0.0, 'mean_word_length': 2.626923076923077, 'pattern_counts': {'":': 0, '<': 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': '3287760', 'n_tokens_mistral': 269, 'n_tokens_neox': 258, 'n_words': 62}