[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
1 changed files with 7 additions and 0 deletions

View File

@ -72,6 +72,13 @@
form.submit(); 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, { KeyboardMappings: Object.assign({}, AutoComplete.defaults.KeyboardMappings, {
"KeyUpAndDown_up": Object.assign({}, AutoComplete.defaults.KeyboardMappings.KeyUpAndDown_up, { "KeyUpAndDown_up": Object.assign({}, AutoComplete.defaults.KeyboardMappings.KeyUpAndDown_up, {
Callback: function (event) { Callback: function (event) {