From a1c0ded18ab9eeb9de82c0712611fc4408c82a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Hubert?= Date: Mon, 1 May 2023 15:36:17 +0200 Subject: [PATCH] Add cursor query param to set xterm.js cursor color --- webssh/static/js/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webssh/static/js/main.js b/webssh/static/js/main.js index f28e231..6f79643 100644 --- a/webssh/static/js/main.js +++ b/webssh/static/js/main.js @@ -56,7 +56,7 @@ jQuery(function($){ key_max_size = 16384, fields = ['hostname', 'port', 'username'], form_keys = fields.concat(['password', 'totp']), - opts_keys = ['bgcolor', 'title', 'encoding', 'command', 'term', 'fontsize', 'fontcolor'], + opts_keys = ['bgcolor', 'title', 'encoding', 'command', 'term', 'fontsize', 'fontcolor', 'cursor'], url_form_data = {}, url_opts_data = {}, validated_form_data, @@ -369,7 +369,8 @@ jQuery(function($){ cursorBlink: true, theme: { background: url_opts_data.bgcolor || 'black', - foreground: url_opts_data.fontcolor || 'white' + foreground: url_opts_data.fontcolor || 'white', + cursor: url_opts_data.cursor || url_opts_data.fontcolor || 'white' } };