Made some changes to the webconsole.js file

This commit is contained in:
NurTasin 2022-12-18 10:53:26 +06:00
parent 63df8d15c6
commit 1a97aecf00
3 changed files with 13 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -7,12 +7,19 @@ Command.addEventListener('keyup',(ev)=>{
//Enter is pressed
cmd=Command.value
if (cmd.length>0) {
// cmd_url_encodded=encodeURIComponent(cmd)
getFile(`/run?cmd=${cmd}`,()=>{
CLIHistory.push(cmd)
if(cmd.trim()=="clear"){
Output.value=""
Command.value=""
HistoryPointer=0
})
}else{
getFile(`/run?cmd=${cmd}`,()=>{
CLIHistory.push(cmd)
Command.value=""
HistoryPointer=0
getFile("/console",(responseText)=>{
Output.value=responseText+Output.value
})
})
}
}
}