mirror of https://github.com/huashengdun/webssh
Added support passing a command via url
parent
0775c0c3ae
commit
f991d25357
|
@ -341,6 +341,9 @@ jQuery(function($){
|
||||||
if (!term.resized) {
|
if (!term.resized) {
|
||||||
resize_terminal(term);
|
resize_terminal(term);
|
||||||
term.resized = true;
|
term.resized = true;
|
||||||
|
if (url_opts_data.command) {
|
||||||
|
sock.send(JSON.stringify({'data': url_opts_data.command+'\r'}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -754,7 +757,7 @@ jQuery(function($){
|
||||||
restore_items(fields);
|
restore_items(fields);
|
||||||
|
|
||||||
initialize_map(fields.concat(['password']), url_form_data);
|
initialize_map(fields.concat(['password']), url_form_data);
|
||||||
initialize_map(['bgcolor', 'title', 'encoding'], url_opts_data);
|
initialize_map(['bgcolor', 'title', 'encoding', 'command'], url_opts_data);
|
||||||
|
|
||||||
parse_url_data(
|
parse_url_data(
|
||||||
decode_uri(window.location.search.substring(1)) + '&' + decode_uri(window.location.hash.substring(1)),
|
decode_uri(window.location.search.substring(1)) + '&' + decode_uri(window.location.hash.substring(1)),
|
||||||
|
|
Loading…
Reference in New Issue