summaryrefslogtreecommitdiff
path: root/elm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2022-05-24 10:02:11 +0200
committerYorhel <git@yorhel.nl>2022-05-24 10:02:14 +0200
commita4cc01a4d2246e5e8ce19ee5893aa6072f1eb37c (patch)
treeeb5d7a276bf3f3277306290b782193819affd908 /elm
parent225e58b6226c33b4e3742230335c7033a78a2828 (diff)
JS: Fix retaining single-character search queries on tab switch
Fixes https://vndb.org/t2520.659
Diffstat (limited to 'elm')
-rw-r--r--elm/searchtabs.js2
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);