separated reload and clear commands
This commit is contained in:
parent
cd75deef30
commit
11ba7c8ef1
@ -61,7 +61,8 @@ function runCommand(input) {
|
||||
function cmd_help() {
|
||||
return "Commands list:<br>" +
|
||||
" -about Information about this website<br>"+
|
||||
" -clear Clear terminal screen<br>" +
|
||||
" -reload Reload the page (deletes all session data)<br>" +
|
||||
" -clear Clear terminal screen (keeps all session data)<br>" +
|
||||
" -history Displays the command history of this session<br>" +
|
||||
" -exec Execute arbitrary math and logic equations<br>" +
|
||||
" -nick Choose your username. Do not use spaces in it<br>" +
|
||||
@ -74,11 +75,27 @@ function cmd_about() {
|
||||
"It serves the purpose of a homepage. It exists just for the fun of creating it.";
|
||||
}
|
||||
|
||||
// Clear terminal by reloading page
|
||||
function cmd_clear() {
|
||||
// Reload page
|
||||
function cmd_reload() {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
// Clear terminal window
|
||||
function cmd_clear() {
|
||||
setTimeout(() => {
|
||||
const tbc = tbDiv.children;
|
||||
for (let i = tbc.length-3; i > 1; i--)
|
||||
tbDiv.removeChild(tbc[i]);
|
||||
|
||||
pretext.current = pretext.original;
|
||||
cursorPosition = 0;
|
||||
cursorYOffset = 7;
|
||||
|
||||
updateCursor();
|
||||
}, 50);
|
||||
return null;
|
||||
}
|
||||
|
||||
// Display the command history line by line
|
||||
function cmd_history() {
|
||||
let output = "";
|
||||
@ -176,7 +193,7 @@ function cmd_exit(error) {
|
||||
}
|
||||
|
||||
// List all users to be able to chat with
|
||||
function cmd_ll() {
|
||||
function cmd_ls() {
|
||||
if (!user.connected)
|
||||
return "You are not connected!";
|
||||
requestUsernames();
|
||||
|
Loading…
Reference in New Issue
Block a user