From b74ddd066bb4d0c37411c48f5398e407c269a530 Mon Sep 17 00:00:00 2001 From: Marc Singer Date: Sat, 31 Mar 2012 12:10:41 -0700 Subject: [PATCH] Issue 39: clipboard not integrated with client operating system. o From the author: Here is a simple patch that prompts the user to enter the text he'd like to paste. It is not integrated to the OS clipboard because to be honnest I've never seen any such hack work reliably among browsers, but at least it's a quick way to transfer text. It adds a menu entry in the context menu "Paste from browser" --- shellinabox/vt100.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/shellinabox/vt100.js b/shellinabox/vt100.js index fe7d6b9..222729e 100644 --- a/shellinabox/vt100.js +++ b/shellinabox/vt100.js @@ -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) { '