diff --git a/shellinabox/shell_in_a_box.jspp b/shellinabox/shell_in_a_box.jspp index 11a893e..8fa2132 100644 --- a/shellinabox/shell_in_a_box.jspp +++ b/shellinabox/shell_in_a_box.jspp @@ -267,16 +267,16 @@ ShellInABox.prototype.keysPressed = function(ch) { } else if (c < 0x10000) { s += 'E' + hex.charAt( (c >> 12) ) + - hex.charAt(0x8 + (c >> 10) & 0x3 ) + + hex.charAt(0x8 + ((c >> 10) & 0x3)) + hex.charAt( (c >> 6) & 0xF ) + hex.charAt(0x8 + ((c >> 4) & 0x3)) + hex.charAt( c & 0xF ); } else if (c < 0x110000) { s += 'F' + hex.charAt( (c >> 18) ) + - hex.charAt(0x8 + (c >> 16) & 0x3 ) + + hex.charAt(0x8 + ((c >> 16) & 0x3)) + hex.charAt( (c >> 12) & 0xF ) + - hex.charAt(0x8 + (c >> 10) & 0x3 ) + + hex.charAt(0x8 + ((c >> 10) & 0x3)) + hex.charAt( (c >> 6) & 0xF ) + hex.charAt(0x8 + ((c >> 4) & 0x3)) + hex.charAt( c & 0xF ); diff --git a/shellinabox/vt100.jspp b/shellinabox/vt100.jspp index 54473d4..6ec0efa 100755 --- a/shellinabox/vt100.jspp +++ b/shellinabox/vt100.jspp @@ -887,7 +887,7 @@ VT100.prototype.initializeElements = function(container) { '
' + - '' + + '' + '' + (typeof suppressAllAudio != 'undefined' && suppressAllAudio ? "" : @@ -1106,7 +1106,7 @@ VT100.prototype.repairElements = function(console) { for (var span = line.firstChild; span; span = span.nextSibling) { var newSpan = document.createElement(span.tagName); newSpan.style.cssText = span.style.cssText; - newSpan.style.className = span.style.className; + newSpan.className = span.className; this.setTextContent(newSpan, this.getTextContent(span)); newLine.appendChild(newSpan); } @@ -1517,7 +1517,7 @@ VT100.prototype.insertBlankLine = function(y, color, style) { line = document.createElement('div'); var span = document.createElement('span'); span.style.cssText = style; - span.style.className = color; + span.className = color; this.setTextContent(span, this.spaces(this.terminalWidth)); line.appendChild(span); } @@ -2321,6 +2321,13 @@ VT100.prototype.pasteFnc = function() { } }; +VT100.prototype.pasteBrowserFnc = function() { + var clipboard = prompt("Paste into this box:",""); + if (clipboard != undefined) { + return this.keysPressed('' + clipboard); + } +}; + VT100.prototype.toggleUTF = function() { this.utfEnabled = !this.utfEnabled; @@ -2426,6 +2433,7 @@ VT100.prototype.showContextMenu = function(x, y) { '