}
this.vt100('Session closed.');
}
- this.showReconnect(true);
+ // Revealing the "reconnect" button is commented out until we hook
+ // up the username+token auto-login mechanism to the new session:
+ //this.showReconnect(true);
} catch (e) {
}
};
(this.session ? '&session=' +
encodeURIComponent(this.session) : '&rooturl='+
encodeURIComponent(this.rooturl));
- request.setRequestHeader('Content-Length', content.length);
request.onreadystatechange = function(shellInABox) {
return function() {
}
}
}(this);
+ ShellInABox.lastRequestSent = Date.now();
request.send(content);
};
this.sendRequest(request);
}
} else if (request.status == 0) {
- // Time Out
- this.sendRequest(request);
+ if (ShellInABox.lastRequestSent + 2000 < Date.now()) {
+ // Timeout, try again
+ this.sendRequest(request);
+ } else {
+ this.vt100('\r\n\r\nRequest failed.');
+ this.sessionClosed();
+ }
} else {
this.sessionClosed();
}
'&height=' + this.terminalHeight +
'&session=' +encodeURIComponent(this.session)+
'&keys=' + encodeURIComponent(keys);
- request.setRequestHeader('Content-Length', content.length);
request.onreadystatechange = function(shellInABox) {
return function() {
try {
sheet.disabled = false;
}
if (!sheet.disabled) {
- label.innerHTML= '<img src="enabled.gif" />' +
+ label.innerHTML= '<img src="/webshell/enabled.gif" />' +
label.innerHTML;
}
} else {
// both ends), or whether this is a on/off toggle, which can be grouped
// together with other on/off options.
group +=
- '<li>' + (enabled ? '<img src="enabled.gif" />' : '') +
+ '<li>' + (enabled ? '<img src="/webshell/enabled.gif" />' : '') +
label +
'</li>';
}
'<div id="scrollable">' +
'<table id="kbd_button">' +
'<tr><td width="100%"> </td>' +
- '<td><img id="kbd_img" src="keyboard.png" /></td>' +
+ '<td><img id="kbd_img" src="/webshell/keyboard.png" /></td>' +
'<td> </td></tr>' +
'</table>' +
'<pre id="lineheight"> </pre>' +
(typeof suppressAllAudio != 'undefined' &&
suppressAllAudio ? "" :
embed + '<bgsound id="beep_bgsound" loop=1 />') +
- '<iframe id="layout" src="keyboard.html" />' +
+ '<iframe id="layout" src="/webshell/keyboard.html" />' +
'</div>';
}
'<li id="reset">Reset</li>' +
'<hr />' +
'<li id="beginconfig">' +
- (this.utfEnabled ? '<img src="enabled.gif" />' : '') +
+ (this.utfEnabled ? '<img src="/webshell/enabled.gif" />' : '') +
'Unicode</li>' +
'<li>' +
- (this.visualBell ? '<img src="enabled.gif" />' : '') +
+ (this.visualBell ? '<img src="/webshell/enabled.gif" />' : '') +
'Visual Bell</li>'+
'<li>' +
- (this.softKeyboard ? '<img src="enabled.gif" />' : '') +
+ (this.softKeyboard ? '<img src="/webshell/enabled.gif" />' : '') +
'Onscreen Keyboard</li>' +
'<li id="endconfig">' +
- (this.blinkingCursor ? '<img src="enabled.gif" />' : '') +
+ (this.blinkingCursor ? '<img src="/webshell/enabled.gif" />' : '') +
'Blinking Cursor</li>'+
(this.usercss.firstChild ?
'<hr id="beginusercss" />' +