]> git.pond.sub.org Git - eow/blobdiff - static/eow.js
start xdump-mode
[eow] / static / eow.js
index a0defc92b9fc76712ba573d994f697d06240f73e..7dedd45a9ac0d7f52ea45f0273f6b76a5c92206f 100644 (file)
@@ -1,8 +1,12 @@
+function byId(id) {
+  return document.getElementById(id);
+}
+
 function eowOut(output) {
   var t = document.createTextNode(output);
   var p = document.createElement("pre");
   p.appendChild(t);
-  dojo.byId("output").appendChild(p);
+  byId("output").appendChild(p);
   window.scrollTo(0, window.scrollMaxY);
 }
 
@@ -68,24 +72,26 @@ function submit_cmdline(cmdline_form) {
   });
 }
 
-function prompt(minutes, btus) {
-  dojo.byId("prompt").textContent = "[" + minutes + "," + btus + "]: ";
-  get_next_update();
+function prompt(p) {
+  byId("prompt").textContent = p;
 }
 
 function msg(m) {
   eowOut(m);
+}
+
+function next() {
   get_next_update();
 }
 
 function setup_client() {
-  var input = dojo.byId("inputfield");
+  var input = byId("inputfield");
   input.focus();
 }
 
 function inputfield_keyup(e) {
   if (e.keyCode == 13) { // Enter
-    eowOut(dojo.byId("prompt").textContent + e.target.value);
+    eowOut(byId("prompt").textContent + e.target.value);
     submit_cmdline(e.target.form.id);
     window.scrollTo(0, window.scrollMaxY);
     e.target.value = "";