diff options
author | Yorhel <git@yorhel.nl> | 2022-05-24 10:02:11 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2022-05-24 10:02:14 +0200 |
commit | a4cc01a4d2246e5e8ce19ee5893aa6072f1eb37c (patch) | |
tree | eb5d7a276bf3f3277306290b782193819affd908 | |
parent | 225e58b6226c33b4e3742230335c7033a78a2828 (diff) |
JS: Fix retaining single-character search queries on tab switch
Fixes https://vndb.org/t2520.659
-rw-r--r-- | elm/searchtabs.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/elm/searchtabs.js b/elm/searchtabs.js index eed07ffc..1c5f82d9 100644 --- a/elm/searchtabs.js +++ b/elm/searchtabs.js @@ -1,7 +1,7 @@ document.querySelectorAll('#searchtabs a').forEach(function(l) { l.onclick = function() { var str = document.getElementById('q').value; - if(str.length > 1) { + if(str.length > 0) { if(this.href.indexOf('/g') >= 0 || this.href.indexOf('/i') >= 0) this.href += '/list'; this.href += '?q=' + encodeURIComponent(str); |