{{> head}}
<style>
	body
	{
		text-align: center;
	}
	textarea
	{
		width: 100%;
		height: 400px;
		margin-top: 8px;
	}
</style>
<form method="post">
	<button type="button" onclick="app.copy()">
		Copy
	</button>
	<button type="submit">
		Save
	</button>
	<button type="button" onclick="app.clear() && app.save()">
		Clear
	</button>
	<button type="button" onclick="app.signOut()">
		Sign out
	</button>
	<textarea name="clipboardData">{{clipboardData}}</textarea>
</form>
<script type="text/javascript">
	'use strict';
	var textarea = document.querySelector('textarea');
	var submitButton = document.querySelector('[type="submit"]');
	window.app = {};
	app.copy = function() {
		textarea.select();
		document.execCommand('copy');
	};
	app.save = function() {
		submitButton.click();
	};
	app.clear = function() {
		textarea.value = '';
	};
	app.signOut = function() {
		window.location.href = '/sign-out';
	};
</script>

{{> head}}
<style>
	body
	{
		text-align: center;
	}
	textarea
	{
		width: 100%;
		height: 400px;
		margin-top: 8px;
	}
</style>
<form method="post">
	<button type="button" onclick="app.copy()">
		Copy
	</button>
	<button type="submit">
		Save
	</button>
	<button type="button" onclick="app.clear(); app.save()">
		Clear
	</button>
	<button type="button" onclick="app.signOut()">
		Sign out
	</button>
	<textarea name="clipboardData">{{clipboardData}}</textarea>
</form>
<script type="text/javascript">
	'use strict';
	var textarea = document.querySelector('textarea');
	var submitButton = document.querySelector('[type="submit"]');
	window.app = {};
	app.copy = function() {
		textarea.select();
		document.execCommand('copy');
	};
	app.save = function() {
		submitButton.click();
	};
	app.clear = function() {
		textarea.value = '';
	};
	app.signOut = function() {
		window.location.href = '/sign-out';
	};
</script>

Clear button wasn't automatically saving.
fix: Clear button wasn't automatically saving.
