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 f991d253572c4f7722e03f089bd16cae667b1c39
parent 0775c0c3ae198e9bf9093081aebb9778c1b5e9ee
Author: Sheng <webmaster0115@gmail.com>
Date:   Fri, 12 Jul 2019 20:05:40 +0800

Added support passing a command via url

Diffstat:
Mwebssh/static/js/main.js | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/webssh/static/js/main.js b/webssh/static/js/main.js @@ -341,6 +341,9 @@ jQuery(function($){ if (!term.resized) { resize_terminal(term); term.resized = true; + if (url_opts_data.command) { + sock.send(JSON.stringify({'data': url_opts_data.command+'\r'})); + } } } } @@ -754,7 +757,7 @@ jQuery(function($){ restore_items(fields); initialize_map(fields.concat(['password']), url_form_data); - initialize_map(['bgcolor', 'title', 'encoding'], url_opts_data); + initialize_map(['bgcolor', 'title', 'encoding', 'command'], url_opts_data); parse_url_data( decode_uri(window.location.search.substring(1)) + '&' + decode_uri(window.location.hash.substring(1)),