mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Use case insensitive search on the docs (#87)
This commit is contained in:
parent
c4447bf226
commit
d6bec7481e
|
@ -205,10 +205,11 @@ function updateSearch() {
|
||||||
contentDiv.style.display = "none";
|
contentDiv.style.display = "none";
|
||||||
searchDiv.style.display = "";
|
searchDiv.style.display = "";
|
||||||
|
|
||||||
|
var query = searchBox.value.toLowerCase();
|
||||||
var foundRequests = [];
|
var foundRequests = [];
|
||||||
var foundRequestsu = [];
|
var foundRequestsu = [];
|
||||||
for (var i = 0; i < requests.length; ++i) {
|
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]);
|
foundRequests.push(requests[i]);
|
||||||
foundRequestsu.push(requestsu[i]);
|
foundRequestsu.push(requestsu[i]);
|
||||||
}
|
}
|
||||||
|
@ -217,7 +218,7 @@ function updateSearch() {
|
||||||
var foundTypes = [];
|
var foundTypes = [];
|
||||||
var foundTypesu = [];
|
var foundTypesu = [];
|
||||||
for (var i = 0; i < types.length; ++i) {
|
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]);
|
foundTypes.push(types[i]);
|
||||||
foundTypesu.push(typesu[i]);
|
foundTypesu.push(typesu[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user