You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
3.6 KiB
JavaScript

4 years ago
function openInput(){
document.getElementById("input").style.visibility = "visible";
document.getElementById("code-input").style.visibility = "hidden";
document.getElementById("fname").focus();
}
let toxt = document.querySelector ("input[type='toxt']");
function checkCode (e) {
if (e.key == "Enter") {
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "PPRGM") {
location='ZIPFILES/pprgm/';
}//OK
4 years ago
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "POISON") {
location='ZIPFILES/poison/';
}
4 years ago
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "BORDERS") {
4 years ago
location='ZIPFILES/BORDERS.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "LIFE") {
4 years ago
location='ZIPFILES/LIFE.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "FUTURE") {
4 years ago
location='ZIPFILES/FUTURE.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "DIALOGUE") {
4 years ago
location='ZIPFILES/DIALOGUE.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "BREATH") {
4 years ago
location='ZIPFILES/BREATH.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "CAPITALISM") {
4 years ago
location='ZIPFILES/CAPITALISM.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "GAMES") {
4 years ago
location='ZIPFILES/GAMES.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "SYNERGY") {
4 years ago
location='ZIPFILES/SINERGY.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "DEATH") {
4 years ago
location='ZIPFILES/DEATH.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "VIRUS") {
4 years ago
location='ZIPFILES/VIRUS.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "THEWHOLE") {
4 years ago
location='ZIPFILES/THEWHOLE.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "CAT") {
location='https://hub.xpub.nl/sandbot/PrototypingTimes/sketches/Euna/';
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "APPOINTMENT") {
4 years ago
location='ZIPFILES/appointment/';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "PRAXIS") {
4 years ago
location='ZIPFILES/PRAXIS.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "OFFLINE") {
4 years ago
location='ZIPFILES/OFFLINE.zip';
4 years ago
}
4 years ago
4 years ago
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "SAVIOR2") {
4 years ago
location='ZIPFILES/SAVIOR.zip';
4 years ago
}
if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "THISISNOTART") {
4 years ago
location='ZIPFILES/thisisnotart.zip';
4 years ago
}
else {
console.log("NO GOOD");
}
}
}
toxt.addEventListener("keydown", checkCode );