update search
This commit is contained in:
parent
1e81129090
commit
ccbb348155
@ -30,6 +30,8 @@ function inject_search(elem) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var search = function() {
|
var search = function() {
|
||||||
|
|
||||||
|
var h = hash.value;
|
||||||
var text = input.value;
|
var text = input.value;
|
||||||
input.value = "";
|
input.value = "";
|
||||||
var group = newsgroup.value;
|
var group = newsgroup.value;
|
||||||
@ -51,14 +53,17 @@ function inject_search(elem) {
|
|||||||
inject_search_result(result[idx]);
|
inject_search_result(result[idx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (ajax.status == 404) {
|
||||||
|
status.innerHTML = "no results";
|
||||||
} else {
|
} else {
|
||||||
status.innerHTML = "HTTP "+ajax.status;
|
status.innerHTML = "HTTP "+ajax.status;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
status.innerHTML = "searching... ";
|
status.innerHTML = "searching... ";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var h = hash.value;
|
|
||||||
if (!h) {
|
if (!h) {
|
||||||
ajax.open("GET", "/api/find?text="+text+"&group="+group);
|
ajax.open("GET", "/api/find?text="+text+"&group="+group);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user