<commit_before><!DOCTYPE html>
<html>

<head>
<!-- 10/18/16 Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous">

<!-- 10/18/16 Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="<KEY>" crossorigin="anonymous">


	<title>List Module</title>



</head>

<body>

<style>
	body {
		background-color:#ddd;
	}
</style>

	<div class="list">
		<h2>Create List</h2>
		<input id="textInput" type="text" />
		<button id="addBtn" type="button">Add Text</button>
	</div>


	<div class="listright">
		<h2>View List</h2>
		<div id="display"></div>

	</div>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<!-- 10/18/16 Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="<KEY>" crossorigin="anonymous"></script>

<script>

function pressAddItem(){
	// get input's content
		var input = document.getElementById('textInput');
		var text = input.value;

		//create a div with the new content
		var newDiv = document.createElement("div");
		var newContent = document.createTextNode(text);
		newDiv.appendChild(newContent);

		//add the input's content to the display
		var display = document.getElementById('display');
		display.appendChild(newDiv);

		//clear the input
		input.value = '';
}

document.getElementById('addBtn').addEventListener('click', pressAddItem);


document.getElementById('textInput').addEventListener('keyup', function (event) {

	// check to see if enter key was pressed
	if(event.which === 13){

		//task on enter
		pressAddItem();
	}
});


//ITWORKS


// - add to list
// - save named list
// - reload list from dropdown
//------------
// - output list to variable, print variable in dom
//
//
//
//---------------------
// prevent injection issues? open input field. Disallow characters? When entered, changed to letters? 
//
// stack: http://stackoverflow.com/questions/20855482/preventing-html-and-script-injections-in-javascript
//
// html = html.replace(/</g, "&lt;").replace(/>/g, "&gt;");
//---------------------
</script>
</body>
</html>
<commit_msg>Write to variable with selection (#4)<commit_after><!DOCTYPE html>
<html>

<head>
<!-- 10/18/16 Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous">

<!-- 10/18/16 Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="<KEY>" crossorigin="anonymous">

<!-- rawgit prduction url https://cdn.rawgit.com/Dragonfyre51/List-Module/master/index.html -->
<!-- rawgit development url https://rawgit.com/Dragonfyre51/List-Module/master/index.html-->

	<title>List Module</title>



</head>

<body>

<style>

	#wrapper {
		background-color:#a00;
		border:1px solid #00a;
		height:50px;
	}


</style>
<div id="wrapper">
<div class="pull-left">
	<div>
	<h2>Instructions:</h2>
	</div>
	<div>
	<h2>Select a List:</h2>
	<select>
		<option>Placeholder 1</option>
		<option>Placeholder 2</option>
		<option>Placeholder 3</option>
	</select>

	</div>
</div>
<div class="pull-right">
	<div>
		<h2>Add an Item:</h2>
		<input id="textInput" type="text" />
		<button id="addBtn" type="button">Add Text</button>
	</div>


	<div>
		<h2>View List:</h2>
		<div id="display"></div>

	</div>
</div>
</div>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<!-- 10/18/16 Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="<KEY>" crossorigin="anonymous"></script>

<script>

// items --> newlist
// newlist -> contents of new div


var newList="0";

function addNewItem(){
	// get input's content
		var input = document.getElementById('textInput');
		var text = input.value;

		//create a div with the new content
		var newDiv = document.createElement("div");
		var newContent = document.createTextNode(text);
		newDiv.appendChild(newContent);

		//add the input's content to the display
		var display = document.getElementById('display');
		display.appendChild(newDiv);

		//clear the input
		input.value = '';
}

document.getElementById('addBtn').addEventListener('click', addNewItem);
document.getElementById('textInput').addEventListener('keyup', function (event) {



	// check to see if enter key was pressed
	if(event.which === 13){

		//task on enter
		addNewItem();
	}
});


//ITWORKS


// - add to list
// - save named list
// - reload list from dropdown
//------------
// - output list to variable, print variable in dom
//
//
//
//---------------------
// prevent injection issues? open input field. Disallow characters? When entered, changed to letters? 
//
// stack: http://stackoverflow.com/questions/20855482/preventing-html-and-script-injections-in-javascript
//
// html = html.replace(/</g, "&lt;").replace(/>/g, "&gt;");
//---------------------
</script>
</body>
</html>

{'fraction_non_alphanumeric': 0.20242214532871972, 'fraction_numerical': 0.020761245674740483, 'mean_word_length': 3.5841409691629957, 'pattern_counts': {'":': 0, '<': 105, '<?xml version=': 0, '>': 107, 'https://': 10, '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': '6043351', 'n_tokens_mistral': 1851, 'n_tokens_neox': 1688, 'n_words': 376}