From ccbb348155d71e5f1cef523e3f9c47d684e53c8a Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 26 Dec 2016 15:38:52 -0500 Subject: [PATCH] update search --- contrib/static/search.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/static/search.js b/contrib/static/search.js index ca8edb3..71c877e 100644 --- a/contrib/static/search.js +++ b/contrib/static/search.js @@ -30,6 +30,8 @@ function inject_search(elem) { } var search = function() { + + var h = hash.value; var text = input.value; input.value = ""; var group = newsgroup.value; @@ -52,13 +54,16 @@ function inject_search(elem) { } } } else { - status.innerHTML = "HTTP "+ajax.status; + if (ajax.status == 404) { + status.innerHTML = "no results"; + } else { + status.innerHTML = "HTTP "+ajax.status; + } } } else { status.innerHTML = "searching... "; } }; - var h = hash.value; if (!h) { ajax.open("GET", "/api/find?text="+text+"&group="+group); } else {