Allow autocompleter to work in a sub folder of the domain name.

This commit is contained in:
Cqoicebordel 2015-02-16 14:45:42 +01:00
parent bbb5e23551
commit f7b052c354
4 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
if(searx.autocompleter) { if(searx.autocompleter) {
window.addEvent('domready', function() { window.addEvent('domready', function() {
new Autocompleter.Request.JSON('q', '/autocompleter', { new Autocompleter.Request.JSON('q', './autocompleter', {
postVar:'q', postVar:'q',
postData:{ postData:{
'format': 'json' 'format': 'json'

View file

@ -1,6 +1,6 @@
if(searx.autocompleter) { if(searx.autocompleter) {
window.addEvent('domready', function() { window.addEvent('domready', function() {
new Autocompleter.Request.JSON('q', '/autocompleter', { new Autocompleter.Request.JSON('q', './autocompleter', {
postVar:'q', postVar:'q',
postData:{ postData:{
'format': 'json' 'format': 'json'

File diff suppressed because one or more lines are too long

View file

@ -19,7 +19,7 @@ if(searx.autocompleter) {
searx.searchResults = new Bloodhound({ searx.searchResults = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
queryTokenizer: Bloodhound.tokenizers.whitespace, queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: '/autocompleter?q=%QUERY' remote: './autocompleter?q=%QUERY'
}); });
searx.searchResults.initialize(); searx.searchResults.initialize();
} }