<commit_before><html>
<head>
	<title>Proc</title>

	<link type = "text/css" rel = "stylesheet" href = "main.css" />
</head>
<body onload = "init()" onkeydown = "key(event)">
	<input id = "summary" type = "text" value = "pros vs cons" onkeyup = "filename()" onchange = "filename()" onmouseover = "show()" onmouseout = "hide()">
	<textarea id = "pros" onfocus = "hide()"></textarea>
	<textarea id = "cons" onfocus = "hide()"></textarea>
</body>
</html>

<script>
	function init()
	{
		if (typeof(Storage) == 'undefined') // Check for local storage support
		{
			alert("Your browser doesn't seem to support local storage.  That's a bit of a deal breaker for Proc since we won't be able to save what you've written.")
		}
	}

	function filename() // Update the title of the page based on the summary content
	{
		document.title = 'Proc // ' + document.getElementById('summary').value
	}

	function show()
	{
		document.getElementById('summary').style.bottom = 0
	}

	function hide()
	{
		document.getElementById('summary').style.bottom = -65
	}

	function key(event)
	{
		if (event.keyCode == 9) // Tab key
		{
			event.preventDefault()

			if (document.activeElement.id == 'pros')
			{
				document.getElementById('cons').focus()
			}
			else
			{
				document.getElementById('pros').focus()
			}
		}
	}
</script><commit_msg>Added localStorage saving.<commit_after><html>
<head>
	<title>Proc</title>

	<link type = "text/css" rel = "stylesheet" href = "main.css" />
</head>
<body onload = "init()" onkeydown = "key(event)">
	<input id = "summary" type = "text" value = "pros vs cons" onkeyup = "filename()" onchange = "filename()" onmouseover = "show()" onmouseout = "hide()">
	<textarea id = "pros" onfocus = "hide()"></textarea>
	<textarea id = "cons" onfocus = "hide()"></textarea>
</body>
</html>

<script>
	function init()
	{
		if (typeof(Storage) == 'undefined') // Check for localStorage support
		{
			alert("Your browser doesn't seem to support local storage.  That's a bit of a deal breaker for Proc since we won't be able to save what you've written.")
		}
		else // Load localStorage values if they exist
		{
			if (localStorage.pros)
			{
				document.getElementById('pros').value = localStorage.pros
			}
			
			if (localStorage.cons)
			{
				document.getElementById('cons').value = localStorage.cons
			}
			
			if (localStorage.summary)
			{
				document.getElementById('summary').value = localStorage.summary
				filename()
			}
		}
	}

	function filename() // Update the title of the page based on the summary content
	{
		document.title = 'Proc // ' + document.getElementById('summary').value
	}

	function show()
	{
		document.getElementById('summary').style.bottom = 0
	}

	function hide()
	{
		document.getElementById('summary').style.bottom = -65
	}

	function key(event)
	{
		// Save the typed values to localStorage
		localStorage.pros = document.getElementById('pros').value
		localStorage.cons = document.getElementById('cons').value
		localStorage.summary = document.getElementById('summary').value

		if (event.keyCode == 9) // Tab key
		{
			event.preventDefault()

			if (document.activeElement.id == 'pros')
			{
				document.getElementById('cons').focus()
			}
			else
			{
				document.getElementById('pros').focus()
			}
		}
	}
</script>
{'fraction_non_alphanumeric': 0.15836135738306328, 'fraction_numerical': 0.0024457352491592784, 'mean_word_length': 3.608450704225352, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '4953680', 'n_tokens_mistral': 1176, 'n_tokens_neox': 1023, 'n_words': 276}