function checkUser() { user = document.getElementById("username_field").value.toUpperCase(); if (user != "SHOCKER") return true; if (window.location.protocol != "https:") { alert("Go safe! (HTTPS)"); return false; } return true; }