Less prototypey

This commit is contained in:
Neale Pickett 2016-04-05 04:16:22 +00:00
parent dbd164e65d
commit 1727383fec
4 changed files with 18 additions and 13 deletions

View File

@ -17,16 +17,16 @@
</head>
<body>
<div id="overview" class="terminal">
🎃
<h1>Monarch Of The Hill</h1>
<p>Brought to you by dirtbags.net</p>
</div>
<div id="messages" class="terminal">
💾
If you turn on JavaScript this will look a lot cooler.
</div>
<div id="puzzles" class="terminal">
🌮
🌮 🌮 🌮 🌮 🌮 🌮 🌮 🌮
</div>
<div id="main" class="terminal">
🎩
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@ var main_terminal;
function Main(element) {
var term = new Terminal(element);
this.start = function() {
function start() {
term.clear();
term.par("Main terminal.")
term.par("This is the main terminal. In this terminal you will get your puzzle content and someplace to enter in possible answers. It's probably just going to pull the old URL, steal the body element, and submit it to a new Terminal method for slow-despooling of the content of text nodes.")
@ -11,12 +11,16 @@ function Main(element) {
term.par("Anyway.");
term.par("Hopefully this demo illustrates how things are going to look.");
}
term.clear();
term.par("Loading…");
setTimeout(start, 2500);
}
function main_start() {
main_terminal = new Main(document.getElementById("main"));
setTimeout(main_terminal.start, 2500);
}
window.addEventListener("load", main_start);

View File

@ -3,17 +3,20 @@ var messages_terminal;
function Messages(element) {
var term = new Terminal(element);
this.start = function() {
function start() {
term.clear();
term.par("Messages terminal");
term.par("I've long wanted a way to communicate things to participants, like «yes, we're aware that JS 12 is broken, we are working on it», or «tanks category is now open!». This might have updates about people scoring points, or provide a chat service (although that has not historically been well-utilized).");
}
term.clear();
term.par("Loading…");
setTimeout(start, 500);
}
function messages_start() {
messages_terminal = new Messages(document.getElementById("messages"));
setTimeout(messages_terminal.start, 500);
}
window.addEventListener("load", messages_start);

View File

@ -27,15 +27,13 @@ function Puzzles(element) {
}
function start() {
term.clear();
term.par("Loading...");
term.par("This is going to show you the list of open puzzles. It should refresh itself periodically, since not refreshing was a source of major confusion in the last setup, at least for kids, who seem not to realize what the reload button in the browser does.")
refreshInterval = setInterval(refresh, 20 * 1000);
refresh();
}
term.clear();
term.par("Loading…");
setTimeout(start, 3000);
}