webssh

Web based ssh client https://github.com/huashengdun/webssh webssh.huashengdun.org/
git clone http://git.hanabi.in/repos/webssh.git
Log | Files | Refs | README | LICENSE

commit 8577c1c845b97b09428cbf503118c3eb627a8824
parent caee6a67fbcc542810c25e1f88ab4965f272dacf
Author: Sheng <webmaster0115@gmail.com>
Date:   Fri, 12 Jul 2019 23:20:34 +0800

Moved command execution code

Diffstat:
Mwebssh/static/js/main.js | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/webssh/static/js/main.js b/webssh/static/js/main.js @@ -341,12 +341,6 @@ jQuery(function($){ if (!term.resized) { resize_terminal(term); term.resized = true; - - if (url_opts_data.command) { - setTimeout(function () { - sock.send(JSON.stringify({'data': url_opts_data.command+'\r'})); - }, 500); - } } } } @@ -476,6 +470,11 @@ jQuery(function($){ term.focus(); state = CONNECTED; title_element.text = url_opts_data.title || default_title; + if (url_opts_data.command) { + setTimeout(function () { + sock.send(JSON.stringify({'data': url_opts_data.command+'\r'})); + }, 500); + } }; sock.onmessage = function(msg) {