<commit_before>
var basePersonDiv = document.getElementById("person-base");
var personDiv = basePersonDiv.cloneNode();
basePersonDiv.parentNode.removeChild(basePersonDiv);
var personList = document.getElementById("person-list");

function next() {

	$('#screen1').fadeOut('fast', function() {
		$('#screen2').fadeIn('fast');
	});
}

function removePerson(person) {
	$(person).slideUp('fast', function() {
		personList.removeChild(person);
	});
}

function addPerson() {
	var person = personDiv.cloneNode();
	person.id = null;
	person.className = "person";
	personList.appendChild(person);
	$(person).slideDown('fast');
}

function back() {
	$('#screen2').fadeOut('fast', function() {
		$('#screen1').fadeIn('fast');
	});
}

function submit() {
	var groupName = $('input[name=group-name]')[0].value;
	var date = $('input[name=date]')[0].value;
	var limit = $('input[name=limit]')[0].value;

	var people = [];
	var personForms = $('.person form');
	for(var i = 0; i < personForms.length; i++) {
		if (phoneNumber(personForms[i].number.value)) {
			people.push({'name': personForms[i].name.value, 'number': personForms[i].number.value});
		}
	}

	var requestData = {
		'group-name': groupName,
		'date': date,
		'limit': limit,
		'people': people
	};


	$('#screen2').fadeOut('fast', function() {
		$('#busy').fadeIn('fast', function() {
			$.ajax({
				url: '/SantaSwap/',
				type: 'POST',
				data: JSON.stringify(requestData),
				contentType: 'application/json; charset=utf-8',
				success: function(data) {
					console.log('success');
					$('#busy').fadeOut('fast', function() {
						$('#screen3').fadeIn('fast');
					});
				},
				error: function(xhr, type) {
					console.log('error');
					console.log(type);
					$('#busy').fadeOut('fast', function() {
						$('#screen2').fadeIn('fast');
					});
				}
			});
		});
	});


}

function phoneNumber(input)  {  
	input = input.replace(/-/g, "");
	return !isNaN(input) && input.length == 10;
}  

<commit_msg>updated js to not be specific to my server again<commit_after>
var basePersonDiv = document.getElementById("person-base");
var personDiv = basePersonDiv.cloneNode();
basePersonDiv.parentNode.removeChild(basePersonDiv);
var personList = document.getElementById("person-list");

function next() {

	$('#screen1').fadeOut('fast', function() {
		$('#screen2').fadeIn('fast');
	});
}

function removePerson(person) {
	$(person).slideUp('fast', function() {
		personList.removeChild(person);
	});
}

function addPerson() {
	var person = personDiv.cloneNode();
	person.id = null;
	person.className = "person";
	personList.appendChild(person);
	$(person).slideDown('fast');
}

function back() {
	$('#screen2').fadeOut('fast', function() {
		$('#screen1').fadeIn('fast');
	});
}

function submit() {
	var groupName = $('input[name=group-name]')[0].value;
	var date = $('input[name=date]')[0].value;
	var limit = $('input[name=limit]')[0].value;

	var people = [];
	var personForms = $('.person form');
	for(var i = 0; i < personForms.length; i++) {
		if (phoneNumber(personForms[i].number.value)) {
			people.push({'name': personForms[i].name.value, 'number': personForms[i].number.value});
		}
	}

	var requestData = {
		'group-name': groupName,
		'date': date,
		'limit': limit,
		'people': people
	};


	$('#screen2').fadeOut('fast', function() {
		$('#busy').fadeIn('fast', function() {
			$.ajax({
				url: '/',
				type: 'POST',
				data: JSON.stringify(requestData),
				contentType: 'application/json; charset=utf-8',
				success: function(data) {
					console.log('success');
					$('#busy').fadeOut('fast', function() {
						$('#screen3').fadeIn('fast');
					});
				},
				error: function(xhr, type) {
					console.log('error');
					console.log(type);
					$('#busy').fadeOut('fast', function() {
						$('#screen2').fadeIn('fast');
					});
				}
			});
		});
	});


}

function phoneNumber(input)  {  
	input = input.replace(/-/g, "");
	return !isNaN(input) && input.length == 10;
}  


{'fraction_non_alphanumeric': 0.2214087351678869, 'fraction_numerical': 0.007068921989396617, 'mean_word_length': 4.247682119205298, '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': '7104334', 'n_tokens_mistral': 1529, 'n_tokens_neox': 1342, 'n_words': 232}