summaryrefslogtreecommitdiff
path: root/searx/static/themes/simple/src/js
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2023-04-15 18:25:04 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2023-04-15 18:54:47 +0200
commitabf574dc0c59517fa0d7f0871780d58a192ab223 (patch)
tree2625a25fb462032b73a863ab57b29842d9c20a72 /searx/static/themes/simple/src/js
parent5c8d56e73a1859ac8ad5d433d6f3a02b2709d696 (diff)
downloadsearxng-abf574dc0c59517fa0d7f0871780d58a192ab223.tar.gz
searxng-abf574dc0c59517fa0d7f0871780d58a192ab223.zip
[mod] Ignore autocomplete_min on queries that include '!' (!bang)
Closes: https://github.com/searxng/searxng/issues/1566 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/static/themes/simple/src/js')
-rw-r--r--searx/static/themes/simple/src/js/main/search.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/searx/static/themes/simple/src/js/main/search.js b/searx/static/themes/simple/src/js/main/search.js
index cb2a9d882..361d2fdcf 100644
--- a/searx/static/themes/simple/src/js/main/search.js
+++ b/searx/static/themes/simple/src/js/main/search.js
@@ -72,6 +72,13 @@
form.submit();
}
},
+ _MinChars: function () {
+ if (this.Input.value.indexOf('!') > -1) {
+ return 0;
+ } else {
+ return AutoComplete.defaults._MinChars.call(this);
+ }
+ },
KeyboardMappings: Object.assign({}, AutoComplete.defaults.KeyboardMappings, {
"KeyUpAndDown_up": Object.assign({}, AutoComplete.defaults.KeyboardMappings.KeyUpAndDown_up, {
Callback: function (event) {