diff --git a/query.html b/query.html index e3deb2f..18fccff 100644 --- a/query.html +++ b/query.html @@ -99,7 +99,16 @@ return; } - document.location.href = window.location.protocol + "//" + contents + "." + window.location.hostname; + document.location.href = window.location.protocol + "//" + encodeURIComponent(contents) + "." + window.location.hostname; + } + + window.onload = (event) => { + document.getElementById("name").addEventListener("keypress", function(event2) { + if(event2.key == "Enter") { + event2.preventDefault(); + document.getElementById("button").click(); + } + }) }