mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01: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:
parent
9177172ea2
commit
ed2a4c8087
8 changed files with 45 additions and 41 deletions
|
|
@ -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 () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue