Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan authored May 20, 2024
1 parent d8c2c0c commit 6d09223
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ console.log(
"%hi.",
"color: #04ff00; font-weight: bold; font-size: 24px;"
);
console.log("%cPassword: '" + password + "' - Uh Oh", "color: grey");
console.log("%csecret: '" + secret + "' - Uh Oh", "color: grey");

//init
textarea.value = "";
Expand All @@ -34,7 +34,7 @@ function enterKey(e) {
let et = "*";
let w = textarea.value.length;
command.innerHTML = et.repeat(w);
if (textarea.value === password) {
if (textarea.value === secret) {
pwd = true;
}
if (pwd && e.keyCode == 13) {
Expand All @@ -43,13 +43,13 @@ function enterKey(e) {
textarea.value = "";
pwd = false;
pw = false;
liner.classList.remove("password");
liner.classList.remove("secret");
} else if (e.keyCode == 13) {
addLine("Incorrect password, please smash your device with a hammer to try again.", "error", 0);
command.innerHTML = "";
textarea.value = "";
pw = false;
liner.classList.remove("password");
liner.classList.remove("secret");
}
} else {
if (e.keyCode == 13) {
Expand Down Expand Up @@ -92,13 +92,13 @@ function commander(cmd) {
loopLines(social, "color2 margin", 80);
break;
case "secret":
liner.classList.add("password");
liner.classList.add("secret");
pw = true;
break;
case "projects":
loopLines(projects, "color2 margin", 80);
break;
case "password":
case "secret":
addLine("<span class=\"inherit\"> Incorrect password, please smash your device with a hammer to try again. </span>", "error", 100);
break;
case "history":
Expand Down

0 comments on commit 6d09223

Please sign in to comment.