[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>
This commit is contained in:
Markus Heiser 2023-04-15 18:25:04 +02:00
parent 5c8d56e73a
commit abf574dc0c

View file

@ -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) {