2018-10-02 15:54:22 -06:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Redeem Token</title>
|
|
|
|
<link rel="stylesheet" href="basic.css">
|
|
|
|
<meta name="viewport" content="width=device-width">
|
2019-02-22 20:46:52 -07:00
|
|
|
<script src="puzzle.js"></script>
|
2018-10-02 15:54:22 -06:00
|
|
|
<script>
|
2019-02-22 20:46:52 -07:00
|
|
|
function tokenInput(e) {
|
|
|
|
let vals = e.target.value.split(":")
|
|
|
|
document.querySelector("input[name=cat]").value = vals[0]
|
|
|
|
document.querySelector("input[name=points]").value = vals[1]
|
|
|
|
document.querySelector("input[name=answer]").value = vals[2]
|
2018-10-02 15:54:22 -06:00
|
|
|
}
|
|
|
|
|
2019-02-22 20:46:52 -07:00
|
|
|
function tokenInit() {
|
|
|
|
document.querySelector("input[name=token]").addEventListener("input", tokenInput)
|
2018-10-02 15:54:22 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
if (document.readyState === "loading") {
|
2019-02-22 20:46:52 -07:00
|
|
|
document.addEventListener("DOMContentLoaded", tokenInit)
|
2018-10-02 15:54:22 -06:00
|
|
|
} else {
|
2019-02-22 20:46:52 -07:00
|
|
|
tokenInit()
|
2018-10-02 15:54:22 -06:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>Redeem Token</h1>
|
2019-02-22 20:46:52 -07:00
|
|
|
<div id="messages"></div>
|
|
|
|
<form id="tokenForm">
|
2018-10-02 15:54:22 -06:00
|
|
|
<input type="hidden" name="cat">
|
|
|
|
<input type="hidden" name="points">
|
|
|
|
<input type="hidden" name="answer">
|
|
|
|
Team ID: <input type="text" name="id"> <br>
|
|
|
|
Token: <input type="text" name="token"> <br>
|
|
|
|
<input type="submit" value="Submit">
|
|
|
|
</form>
|
|
|
|
<nav>
|
|
|
|
<ul>
|
|
|
|
<li><a href="puzzle-list.html">Puzzles</a></li>
|
|
|
|
<li><a href="scoreboard.html">Scoreboard</a></li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</body>
|
|
|
|
</html>
|