changed: use prompt for grep

This commit is contained in:
quenousimporte 2023-10-23 13:27:38 +02:00
parent b33b85f8ee
commit 1328d77cdc
1 changed files with 3 additions and 12 deletions

15
main.js
View File

@ -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));
}
} }
} }