added the tandy 400 and a table, adaptive sizing, and click-anywhere to focus

This commit is contained in:
Joshua Seigler 2014-12-21 16:18:42 -05:00
parent adae1b71a7
commit bb350b07e9
12 changed files with 332 additions and 114 deletions

View file

@ -20,17 +20,22 @@
}
var commandline = document.getElementById("command");
commandline.value = "";
commandline.focus();
commandline.onkeydown = syncTyping;
commandline.onkeyup = syncTyping;
commandline.onselect = syncTyping;
commandline.onfocus = syncTyping;
commandline.focus();
document.onmousedown = function() {
commandline.focus();
return false;
};
function handleForm() {
var scrollback = document.getElementById("scrollback");
var history = document.getElementById("history");
var val = this.command.value;
this.command.value = "";
document.getElementById("typing").innerHTML = "";
scrollback.innerHTML = scrollback.innerHTML + "a>" + escapeHTML(val) + "<br>Command not found.<br>";
history.innerHTML = history.innerHTML + "a>" + escapeHTML(val) + "<br>Command not found.<br>";
return false;
}
document.forms[0].onsubmit = handleForm;
})();
})();