mirror of
https://github.com/searxng/searxng.git
synced 2026-05-29 22:24:13 +02:00
[mod] client_settings: pass settings from server to JS client
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
@@ -59,11 +59,11 @@
|
||||
createClearButton(qinput);
|
||||
|
||||
// autocompleter
|
||||
if (searxng.autocompleter) {
|
||||
if (searxng.settings.autocomplete_provider) {
|
||||
searxng.autocomplete = AutoComplete.call(w, {
|
||||
Url: "./autocompleter",
|
||||
EmptyMessage: searxng.translations.no_item_found,
|
||||
HttpMethod: searxng.method,
|
||||
EmptyMessage: searxng.settings.translations.no_item_found,
|
||||
HttpMethod: searxng.settings.http_method,
|
||||
HttpHeaders: {
|
||||
"Content-type": "application/x-www-form-urlencoded",
|
||||
"X-Requested-With": "XMLHttpRequest"
|
||||
@@ -92,7 +92,7 @@
|
||||
}
|
||||
|
||||
// vanilla js version of search_on_category_select.js
|
||||
if (qinput !== null && d.querySelector('.help') != null && searxng.search_on_category_select) {
|
||||
if (qinput !== null && d.querySelector('.help') != null && searxng.settings.search_on_category_select) {
|
||||
d.querySelector('.help').className = 'invisible';
|
||||
|
||||
searxng.on('#categories input', 'change', function () {
|
||||
|
||||
Reference in New Issue
Block a user