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 fdcf1718c110462ee682157e64e7b45c3d9211af
parent 0f542ed24f07af918057d28a9cdd508920bc5bec
Author: Sheng <webmaster0115@gmail.com>
Date:   Sat, 29 Sep 2018 20:19:45 +0800

Set default port to 22

Diffstat:
Mwebssh/static/js/main.js | 6+++++-
Mwebssh/templates/index.html | 2+-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/webssh/static/js/main.js b/webssh/static/js/main.js @@ -387,7 +387,11 @@ jQuery(function($){ attr = attrs[i]; val = data.get(attr); if (typeof val === 'string') { - data.set(attr, val.trim()); + val = val.trim(); + if (attr === 'port' && val === '') { + val = 22; + } + data.set(attr, val); } } } diff --git a/webssh/templates/index.html b/webssh/templates/index.html @@ -36,7 +36,7 @@ </div> <div class="col"> <label for="Port">Port</label> - <input class="form-control" type="number" id="port" name="port" value="" min=1 max=65535 required> + <input class="form-control" type="number" id="port" name="port" placeholder="22" value="" min=1 max=65535> </div> </div> <div class="row">