summaryrefslogtreecommitdiff
path: root/modules/unicode/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'modules/unicode/index.html')
-rw-r--r--modules/unicode/index.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/unicode/index.html b/modules/unicode/index.html
index 9335081..23492cd 100644
--- a/modules/unicode/index.html
+++ b/modules/unicode/index.html
@@ -18,6 +18,9 @@ body {
</style>
<script>
function do_lookup() {
+ var input = document.getElementById("input").value;
+ if (input.length == 0) return;
+
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
@@ -28,7 +31,8 @@ function do_lookup() {
}
}
};
- xhr.open("GET", "/unicode/lookup/" + encodeURIComponent(document.getElementById("input").value));
+
+ xhr.open("GET", "/unicode/lookup/" + encodeURIComponent(input));
xhr.responseType = "text";
xhr.setRequestHeader("Content-Type", "text/plain");
xhr.send();