<commit_before>'use strict';

(function(url){
    var storedSelection = localStorage.getItem("selected-country")
	$.ajax({
        type:"GET",
        url: url,
        success: function(data) {
			var fixedJSON = data.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g, '"$2": ')
			fixedJSON = fixedJSON.replace(/'/g, '"')//JSON parse only wants "
			var data = JSON.parse(fixedJSON)
        	var items = []
        	data.forEach(function(obj){
        		obj.name = obj.name.substring(0, 20)
        		items.push( "<option value='" + obj.code + "'>" + obj.name + "</option>" )
        	})
            $( "#countries-list").append(items.join(""))
			if(storedSelection){
			 	$("#countries-list").val(storedSelection)
				$("." + storedSelection).attr("class", "datamaps-subunit " + storedSelection +" redify")
				redCountry = document.getElementsByClassName("redify")[0]
			}
        }
    });
	var redCountry
	var selectedCountry = storedSelection || "AF"
	var saveSelection = $(".save-toggle").is(":checked")
    $(".save-toggle").change(function(){
        if (!saveSelection) {
            updateSelection()
            localStorage.setItem("selected-country",selectedCountry)
        }
    })
	$("#countries-list").change(function(){
		updateSelection()
		if (saveSelection) {
			localStorage.setItem("selected-country",selectedCountry)
		}
		cleanupRedcountry<commit_msg>background repat + strict + typo<commit_after>'use strict';

(function(url){
    var storedSelection = localStorage.getItem("selected-country")
	$.ajax({
        type:"GET",
        url: url,
        success: function(data) {
			var fixedJSON = data.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g, '"$2": ')
			fixedJSON = fixedJSON.replace(/'/g, '"')//JSON parse only wants "
			var data = JSON.parse(fixedJSON)
        	var items = []
        	data.forEach(function(obj){
        		obj.name = obj.name.substring(0, 20)
        		items.push( "<option value='" + obj.code + "'>" + obj.name + "</option>" )
        	})
            $( "#countries-list").append(items.join(""))
			if(storedSelection){
			 	$("#countries-list").val(storedSelection)
				$("." + storedSelection).attr("class", "datamaps-subunit " + storedSelection +" redify")
				redCountry = document.getElementsByClassName("redify")[0]
			}
        }
    })

	var redCountry
	var selectedCountry = storedSelection || "AF"
	var saveSelection = $(".save-toggle").is(":checked")
    $(".save-toggle").change(function(){
        if (!saveSelection) {
            updateSelection()
            localStorage.setItem("selected-country",selectedCountry)
        }
    })
	$("#countries-list").change(function(){
		updateSelection()
		if (saveSelection) {
			localStorage.setItem("selected-country",selectedCountry)
		}
		cleanupRedcountry()
{'fraction_non_alphanumeric': 0.18783930510314875, 'fraction_numerical': 0.005066956207021353, 'mean_word_length': 3.070692194403535, 'pattern_counts': {'":': 4, '<': 7, '<?xml version=': 0, '>': 7, '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': '2038017', 'n_tokens_mistral': 908, 'n_tokens_neox': 858, 'n_words': 134}