Use case insensitive search on the docs (#87)

This commit is contained in:
Lonami Exo 2017-05-19 09:44:15 +02:00
parent c4447bf226
commit d6bec7481e

View File

@ -205,10 +205,11 @@ function updateSearch() {
contentDiv.style.display = "none";
searchDiv.style.display = "";
var query = searchBox.value.toLowerCase();
var foundRequests = [];
var foundRequestsu = [];
for (var i = 0; i < requests.length; ++i) {
if (requests[i].toLowerCase().indexOf(searchBox.value) != -1) {
if (requests[i].toLowerCase().indexOf(query) != -1) {
foundRequests.push(requests[i]);
foundRequestsu.push(requestsu[i]);
}
@ -217,7 +218,7 @@ function updateSearch() {
var foundTypes = [];
var foundTypesu = [];
for (var i = 0; i < types.length; ++i) {
if (types[i].toLowerCase().indexOf(searchBox.value) != -1) {
if (types[i].toLowerCase().indexOf(query) != -1) {
foundTypes.push(types[i]);
foundTypesu.push(typesu[i]);
}