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 ddbb2c3fb1fec9d57ca3b1beefbbe09232ad827b
parent de828cbabfac7aacf92fc638d9448fdd19bf0d2a
Author: Sheng <webmaster0115@gmail.com>
Date:   Wed, 25 Aug 2021 19:18:28 +0800

Ignore invalid font size

Diffstat:
Mwebssh/static/js/main.js | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/webssh/static/js/main.js b/webssh/static/js/main.js @@ -361,13 +361,18 @@ jQuery(function($){ decoder = window.TextDecoder ? new window.TextDecoder(encoding) : encoding, terminal = document.getElementById('terminal'), termOptions = { + cursorBlink: true, theme: { background: url_opts_data.bgcolor || 'black' } }; - if (url_opts_data.fontsize !== undefined) - termOptions.fontSize = parseInt(url_opts_data.fontsize); + if (url_opts_data.fontsize) { + var fontsize = window.parseInt(url_opts_data.fontsize); + if (fontsize && fontsize > 0) { + termOptions.fontSize = fontsize; + } + } var term = new window.Terminal(termOptions);