1
digest_constant = "hello";
3
/* Starts the console server.
4
* Returns an object with fields "host", "port", "magic" describing the
7
function start_server()
9
var xhr = ajax_call("consoleservice", "", "", "POST");
10
var json_text = xhr.responseText;
11
return JSON.parse(json_text);
16
var consolebody = document.getElementById("consolebody");
17
var iframe = document.createElement("iframe");
18
consolebody.appendChild(iframe);
19
iframe.setAttribute("width", "100%");
20
/* TODO: Height 100%, once CSS is working */
21
iframe.setAttribute("height", "600px");
23
/* Start the server */
24
var server_info = start_server();
26
var digest = hex_md5(digest_constant + server_info.magic);
29
+ server_info.host.toString() + ":"
30
+ server_info.port.toString() + "?digest=" + digest;
34
iframe.setAttribute("src", url);