diff --git a/js/commands.js b/js/commands.js
index c725627..e8024a0 100644
--- a/js/commands.js
+++ b/js/commands.js
@@ -1,3 +1,3 @@
function cmd_help() {
- return "Help haha";
+ return "You need help? Sucks to be you! Hahahahaha";
}
\ No newline at end of file
diff --git a/js/main.js b/js/main.js
index d8388d9..2287ce3 100644
--- a/js/main.js
+++ b/js/main.js
@@ -76,17 +76,10 @@ document.addEventListener("keydown", e => {
// Run command and return output???
let commandOutput = runCommand(text);
- const aTag = str => {
- const link = document.createElement("a");
- link.style.color = "lightgrey";
- link.textContent = str;
- return link;
- };
-
- tbDiv.appendChild(aTag(text));
+ tbDiv.appendChild(createText(text));
tbDiv.innerHTML += `
`;
if (commandOutput !== "") {
- tbDiv.append(aTag(commandOutput))
+ tbDiv.append(createText(commandOutput))
tbDiv.innerHTML += `
`;
cursorYOffset++;
}
@@ -110,6 +103,13 @@ document.addEventListener("keydown", e => {
}
});
+function createText(str) {
+ const link = document.createElement("a");
+ link.style.color = "lightgrey";
+ link.textContent = str;
+ return link;
+}
+
function runCommand(input) {
let output = "";