moth/www/js/main.js

27 lines
1.1 KiB
JavaScript
Raw Normal View History

2016-04-04 21:45:00 -06:00
var main_terminal;
2016-04-03 21:12:48 -06:00
function Main(element) {
var term = new Terminal(element);
2016-04-04 22:16:22 -06:00
function start() {
2016-04-03 21:12:48 -06:00
term.clear();
2016-04-04 10:40:21 -06:00
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.")
term.par("One side-effect of the method I'm considering to slow-despool pre-written HTML is that inline images will load before the text. While not exactly what I had in mind for the feel of the thing, it may still be an interesting effect. I mean, if anything, text should render the *quickest*, so if we're going to turn everything on its head, why not make images pull in quicker than text.");
term.par("Anyway.");
term.par("Hopefully this demo illustrates how things are going to look.");
2016-04-03 21:12:48 -06:00
}
2016-04-04 22:16:22 -06:00
term.clear();
term.par("Loading…");
setTimeout(start, 2500);
2016-04-03 21:12:48 -06:00
}
function main_start() {
2016-04-04 21:45:00 -06:00
main_terminal = new Main(document.getElementById("main"));
2016-04-03 21:12:48 -06:00
}
window.addEventListener("load", main_start);