<commit_before>(function(){
	'use strict';
	var count = document.getElementById('tabcount');
	var outputJson = document.getElementById('outjson');
	var outputText = document.getElementById('outtext');
	var inputJson = document.getElementById('importJsonArea');
	var importButton = document.getElementById('import');
	importButton.addEventListener('click', function() {
        ImportJson();
    });

	var tabs = ['tab_text','tab_json'];
	var tab1 = document.getElementsByClassName('tab_text');
	var tab2 = document.getElementsByClassName('tab_json');
	for(var i=0;i<tab1.length;i++){
    	tab1[i].addEventListener('click', function(){
    		outputText.classList.add('show');
    		outputText.classList.remove('hide');
    		outputJson.classList.add('hide');
    		outputJson.classList.remove('show');
    	}, false);
    }
	for(var i=0;i<tab2.length;i++){
    	tab2[i].addEventListener('click', function(){
    		outputText.classList.add('hide');
    		outputText.classList.remove('show');
    		outputJson.classList.add('show');
    		outputJson.classList.remove('hide');
    	}, false);
    }
    

	chrome.tabs.query( {}, function (tabs) {
		var tab = tabs;
		var json = "";
		var plaintext = "";
		count.textContent = tab.length;
		function outasjson(){
			json += "[";
			for(var v in tab){
				json += "{";
				json += "\"title\": \"" + tab[v].title + "\",\"url\": \"" + tab[v].url + "\""; //json 
				json += "},";
			}
			json += "]";
		}outasjson();
		function outastext(){
			for(var v in tab){
				plaintext += tab[v].title + "\t" + tab[v].url + "\n"; //json 
			}
		}outastext();
		outputJson.value = json;
		outputText.value = plaintext;
	});
	function ImportJson(){
		console.log(inputJson.value);
		if(inputJson.value == ""){
			inputJson.value = "ERROR";
		} else {
			var urls = JSON.parse(inputJson.value);
			for(var v in urls){
				openTabs(urls[v].url);
			}
		}<commit_msg>fix json<commit_after>(function(){
	'use strict';
	var count = document.getElementById('tabcount');
	var outputJson = document.getElementById('outjson');
	var outputText = document.getElementById('outtext');
	var inputJson = document.getElementById('importJsonArea');
	var importButton = document.getElementById('import');
	importButton.addEventListener('click', function() {
        ImportJson();
    });

	var tabs = ['tab_text','tab_json'];
	var tab1 = document.getElementsByClassName('tab_text');
	var tab2 = document.getElementsByClassName('tab_json');
	for(var i=0;i<tab1.length;i++){
    	tab1[i].addEventListener('click', function(){
    		outputText.classList.add('show');
    		outputText.classList.remove('hide');
    		outputJson.classList.add('hide');
    		outputJson.classList.remove('show');
    	}, false);
    }
	for(var i=0;i<tab2.length;i++){
    	tab2[i].addEventListener('click', function(){
    		outputText.classList.add('hide');
    		outputText.classList.remove('show');
    		outputJson.classList.add('show');
    		outputJson.classList.remove('hide');
    	}, false);
    }
    

	chrome.tabs.query( {}, function (tabs) {
		var tab = tabs;
		var json = "";
		var plaintext = "";
		count.textContent = tab.length;
		function outasjson(){
			json += "[";
			for(var v in tab){
				json += "{";
				json += "\"title\": \"" + tab[v].title + "\",\"url\": \"" + tab[v].url + "\""; //json 
				if(v == tab.length - 1){
					json += "}";
				} else {
					json += "},";
				}
			}
			json += "]";
		}outasjson();
		function outastext(){
			for(var v in tab){
				plaintext += tab[v].title + "\t" + tab[v].url + "\n"; //json 
			}
		}outastext();
		outputJson.value = json;
		outputText.value = plaintext;
	});
	function ImportJson(){
		console.log(inputJson.value);
		if(inputJson.value == ""){
			inputJson.value = "ERROR";
		} else {
			var urls = JSON.parse(inputJson.value);
			for(var v in urls){
				openTabs(urls[v].url);
			}
		}
{'fraction_non_alphanumeric': 0.19470404984423675, 'fraction_numerical': 0.004413291796469367, 'mean_word_length': 3.4906759906759905, 'pattern_counts': {'":': 4, '<': 7, '<?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': '3759776', 'n_tokens_mistral': 1414, 'n_tokens_neox': 1309, 'n_words': 224}