Moved command execution code

pull/75/head
Sheng 2019-07-12 23:20:34 +08:00
parent caee6a67fb
commit 8577c1c845
1 changed files with 5 additions and 6 deletions

View File

@ -341,12 +341,6 @@ jQuery(function($){
if (!term.resized) {
resize_terminal(term);
term.resized = true;
if (url_opts_data.command) {
setTimeout(function () {
sock.send(JSON.stringify({'data': url_opts_data.command+'\r'}));
}, 500);
}
}
}
}
@ -476,6 +470,11 @@ jQuery(function($){
term.focus();
state = CONNECTED;
title_element.text = url_opts_data.title || default_title;
if (url_opts_data.command) {
setTimeout(function () {
sock.send(JSON.stringify({'data': url_opts_data.command+'\r'}));
}, 500);
}
};
sock.onmessage = function(msg) {