mirror of
https://github.com/searx/searx
synced 2024-12-11 19:49:33 +01:00
[fix] simple theme: fix autocomplete
AJAX requests send the X-Requested-With HTTP header, so searx.webapp.autocompleter returns the results with the expected data format. Related to #2127 Close #2203
This commit is contained in:
parent
ae07f4a211
commit
c23401e9fa
@ -1,4 +1,4 @@
|
||||
/*! searx | 04-06-2020 | */
|
||||
/*! searx | 19-09-2020 | https://github.com/asciimoo/searx */
|
||||
/*
|
||||
* searx, A privacy-respecting, hackable metasearch engine
|
||||
*
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
/*! searx | 04-06-2020 | */
|
||||
/*! searx | 19-09-2020 | https://github.com/asciimoo/searx */
|
||||
/*
|
||||
* searx, A privacy-respecting, hackable metasearch engine
|
||||
*
|
||||
|
2
searx/static/themes/simple/css/searx.min.css
vendored
2
searx/static/themes/simple/css/searx.min.css
vendored
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
/*! simple/searx.min.js | 15-06-2020 | */
|
||||
/*! simple/searx.min.js | 19-09-2020 | https://github.com/asciimoo/searx */
|
||||
|
||||
(function(t,e){"use strict";var a=e.currentScript||function(){var t=e.getElementsByTagName("script");return t[t.length-1]}();t.searx={touch:"ontouchstart"in t||t.DocumentTouch&&document instanceof DocumentTouch||false,method:a.getAttribute("data-method"),autocompleter:a.getAttribute("data-autocompleter")==="true",search_on_category_select:a.getAttribute("data-search-on-category-select")==="true",infinite_scroll:a.getAttribute("data-infinite-scroll")==="true",static_path:a.getAttribute("data-static-path"),no_item_found:a.getAttribute("data-no-item-found")};e.getElementsByTagName("html")[0].className=t.searx.touch?"js touch":"js"})(window,document);
|
||||
//# sourceMappingURL=searx.head.min.js.map
|
@ -1531,6 +1531,10 @@ module.exports = AutoComplete;
|
||||
Url: "./autocompleter",
|
||||
EmptyMessage: searx.no_item_found,
|
||||
HttpMethod: searx.method,
|
||||
HttpHeaders: {
|
||||
"Content-type": "application/x-www-form-urlencoded",
|
||||
"X-Requested-With": "XMLHttpRequest"
|
||||
},
|
||||
MinChars: 4,
|
||||
Delay: 300,
|
||||
}, "#" + qinput_id);
|
||||
|
4
searx/static/themes/simple/js/searx.min.js
vendored
4
searx/static/themes/simple/js/searx.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -75,6 +75,10 @@
|
||||
Url: "./autocompleter",
|
||||
EmptyMessage: searx.no_item_found,
|
||||
HttpMethod: searx.method,
|
||||
HttpHeaders: {
|
||||
"Content-type": "application/x-www-form-urlencoded",
|
||||
"X-Requested-With": "XMLHttpRequest"
|
||||
},
|
||||
MinChars: 4,
|
||||
Delay: 300,
|
||||
}, "#" + qinput_id);
|
||||
|
Loading…
Reference in New Issue
Block a user