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 if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "POISON") { location='ZIPFILES/poison/'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "BORDERS") { location='ZIPFILES/BORDERS.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "LIFE") { location='ZIPFILES/LIFE.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "FUTURE") { location='ZIPFILES/FUTURE.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "DIALOGUE") { location='ZIPFILES/DIALOGUE.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "BREATH") { location='ZIPFILES/BREATH.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "CAPITALISM") { location='ZIPFILES/CAPITALISM.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "GAMES") { location='ZIPFILES/GAMES.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "SYNERGY") { location='ZIPFILES/SINERGY.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "DEATH") { location='ZIPFILES/DEATH.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "VIRUS") { location='ZIPFILES/VIRUS.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "THEWHOLE") { location='ZIPFILES/THEWHOLE.zip'; } 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") { location='ZIPFILES/appointment/'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "PRAXIS") { location='ZIPFILES/PRAXIS.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "OFFLINE") { location='ZIPFILES/OFFLINE.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "SAVIOR2") { location='ZIPFILES/SAVIOR.zip'; } if (document.querySelector ("input[type='toxt']").value.toUpperCase() === "THISISNOTART") { location='ZIPFILES/thisisnotart.zip'; } else { console.log("NO GOOD"); } } } toxt.addEventListener("keydown", checkCode );