Skip to content

Commit 1cf19c7

Browse files
authored
Merge pull request #346 from bhubr/set-cursor-color
Add cursor query param to set xterm.js cursor color
2 parents 47cfeed + a1c0ded commit 1cf19c7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

webssh/static/js/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jQuery(function($){
5656
key_max_size = 16384,
5757
fields = ['hostname', 'port', 'username'],
5858
form_keys = fields.concat(['password', 'totp']),
59-
opts_keys = ['bgcolor', 'title', 'encoding', 'command', 'term', 'fontsize', 'fontcolor'],
59+
opts_keys = ['bgcolor', 'title', 'encoding', 'command', 'term', 'fontsize', 'fontcolor', 'cursor'],
6060
url_form_data = {},
6161
url_opts_data = {},
6262
validated_form_data,
@@ -369,7 +369,8 @@ jQuery(function($){
369369
cursorBlink: true,
370370
theme: {
371371
background: url_opts_data.bgcolor || 'black',
372-
foreground: url_opts_data.fontcolor || 'white'
372+
foreground: url_opts_data.fontcolor || 'white',
373+
cursor: url_opts_data.cursor || url_opts_data.fontcolor || 'white'
373374
}
374375
};
375376

0 commit comments

Comments
 (0)