mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-05 22:39:43 +00:00
clear search input when looking for anime/adding torrent
This commit is contained in:
parent
f4cc2c0293
commit
ec436c2def
1 changed files with 3 additions and 0 deletions
|
|
@ -15,9 +15,11 @@ window.addEventListener("paste", async e => {
|
|||
item.getAsString(text => {
|
||||
if (torrentRx.exec(text)) {
|
||||
e.preventDefault();
|
||||
search.value = ""
|
||||
addTorrent(text);
|
||||
} else if (imageRx.exec(text)) {
|
||||
e.preventDefault();
|
||||
search.value = ""
|
||||
traceAnime(text)
|
||||
}
|
||||
})
|
||||
|
|
@ -28,6 +30,7 @@ window.addEventListener("paste", async e => {
|
|||
img = doc.querySelectorAll("img")[0]
|
||||
if (img) {
|
||||
e.preventDefault();
|
||||
search.value = ""
|
||||
traceAnime(img.src)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue