From 1c28a1fa9ea563be4568e6e8ab22b2ea5ceeb069 Mon Sep 17 00:00:00 2001 From: valentijn <120188387+HerpieDerpieee@users.noreply.github.com> Date: Fri, 19 Jan 2024 12:06:04 +0100 Subject: [PATCH] removed some console logs --- commands/commands.js | 2 -- httpdocs/public/js/terminal.js | 6 ------ server.js | 2 -- 3 files changed, 10 deletions(-) diff --git a/commands/commands.js b/commands/commands.js index 60065f0..7d482da 100644 --- a/commands/commands.js +++ b/commands/commands.js @@ -2,13 +2,11 @@ function ls (req, res, dir, fs) { dir = dir.startsWith('/') ? dir : '/' + dir; dir = dir.endsWith('/') ? dir : dir + '/'; - console.log(dir); const contents = fs[dir]; if (contents && typeof contents === 'object') { let keys = Object.keys(contents) - console.log(keys); res.json({"response": keys.join(" "), "command": "ls"}); } else { res.json({"response": "No Files Found!", "command": "ls"}); diff --git a/httpdocs/public/js/terminal.js b/httpdocs/public/js/terminal.js index b867730..9fbf392 100644 --- a/httpdocs/public/js/terminal.js +++ b/httpdocs/public/js/terminal.js @@ -19,7 +19,6 @@ async function sendCommand(e){ if (command.startsWith("cd")){ let commandSplit = command.split(" "); - console.log(commandSplit) try { if (commandSplit[1].startsWith("/")){ currentFolder = commandSplit[1]; @@ -59,9 +58,6 @@ async function sendCommand(e){ return; } - - console.log("COMMAND SENT: "+command); - try { // Construct the URL with the command parameter in the query string const url = "/execute?command=" + encodeURIComponent(command) + "¤tDir=" + encodeURIComponent(currentFolder); @@ -101,7 +97,6 @@ function deactivateAllStuff() { input.disabled = true; input.setAttribute("id", ""); - console.log("deactivated inputs"); } @@ -116,7 +111,6 @@ function handleExecutionResponse(response) { commandResponse.appendChild(textElement) terminalContainer.appendChild(commandResponse); - console.log("created response element") //create new terminal line. diff --git a/server.js b/server.js index c505f21..e30ebe6 100644 --- a/server.js +++ b/server.js @@ -35,8 +35,6 @@ app.get("/execute", (req, res)=> { const currentDir = req.query.currentDir - console.log(`Executed Command: ${formatted_command}`); - if (formatted_command.startsWith("ls")){ commands.ls(req, res, currentDir, fileSystem); }