changed: use prompt for grep
This commit is contained in:
parent
b33b85f8ee
commit
1328d77cdc
15
main.js
15
main.js
|
@ -1650,19 +1650,10 @@ function showgrepresult(grepresult)
|
||||||
|
|
||||||
function showgrep()
|
function showgrep()
|
||||||
{
|
{
|
||||||
filteredlist.hidden = true;
|
var text = prompt("Search:");
|
||||||
searchdialog.hidden = false;
|
if (text)
|
||||||
filter.focus();
|
|
||||||
filter.select();
|
|
||||||
|
|
||||||
filter.onkeydown = function()
|
|
||||||
{
|
{
|
||||||
if (event.key === "Enter")
|
showgrepresult(grep(text));
|
||||||
{
|
|
||||||
event.preventDefault();
|
|
||||||
searchdialog.hidden = true;
|
|
||||||
showgrepresult(grep(filter.value));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue