Skip to content

Commit

Permalink
Merge pull request #346 from bhubr/set-cursor-color
Browse files Browse the repository at this point in the history
Add cursor query param to set xterm.js cursor color
  • Loading branch information
huashengdun committed May 2, 2023
2 parents 47cfeed + a1c0ded commit 1cf19c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webssh/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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'
}
};

Expand Down

0 comments on commit 1cf19c7

Please sign in to comment.