1
// XMLTerm Chrome Commands
3
function StartupXMLTerm() {
4
//dump("StartupXMLTerm:"+window.frames.length+"\n");
5
//dump("StartupXMLTerm:"+window.frames[0].name+"\n");
7
if (window.frames.length == 2) {
8
xmltwin = window.frames[1];
9
xmltwin.xmltbrowser = window.frames[0];
11
xmltwin = window.frames[0];
14
// Determine telnet URL, if any, from query portion of chrome URL
15
// For security reasons, only the protocol/host portion of the URL should be
16
// used to open a new connection
18
if (document.location.search) {
19
url = document.location.search.substr(1);
21
//dump("StartupXMLterm: URL="+url+"\n");
23
//dump("StartupXMLterm: WINDOW.ARGUMENTS="+window.arguments+"\n");
25
dump("Trying to make an XMLTerm Shell through the component manager...\n");
27
var xmltshell = Components.classes["@mozilla.org/xmlterm/xmltermshell;1"].createInstance();
29
xmltshell = xmltshell.QueryInterface(Components.interfaces.mozIXMLTermShell);
30
//dump("Interface xmltshell2 = " + xmltshell + "\n");
33
dump("Failed to create XMLTerm shell\n");
38
// Store the XMLTerm shell in current window and in the XMLTerm frame
39
window.xmlterm = xmltshell;
40
xmltwin.xmlterm = xmltshell;
42
if (window.arguments != null)
43
window.title = "xmlterm: "+window.arguments;
45
// Initialize XMLTerm shell in content window with argvals
46
window.xmlterm.init(xmltwin, "", window.arguments);