diff options
author | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-03-21 11:11:31 +0100 |
---|---|---|
committer | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-03-21 11:11:31 +0100 |
commit | c8cf95aa56590800c4f2d39a39d0a70537e7382e (patch) | |
tree | c23b01cdebee0c4cbaf6db5ed7a429cf571ae69c /searx/static/js | |
parent | cc7f3cb61798463036a886ae5f0ccd06aca5e625 (diff) | |
download | searxng-c8cf95aa56590800c4f2d39a39d0a70537e7382e.tar.gz searxng-c8cf95aa56590800c4f2d39a39d0a70537e7382e.zip |
deactivate autocompleter by default
Diffstat (limited to 'searx/static/js')
-rw-r--r-- | searx/static/js/searx.js | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/searx/static/js/searx.js b/searx/static/js/searx.js index 8687a9066..2b2e0c98c 100644 --- a/searx/static/js/searx.js +++ b/searx/static/js/searx.js @@ -1,18 +1,20 @@ -window.addEvent('domready', function() { - new Autocompleter.Request.JSON('q', '/autocompleter', { - postVar:'q', - postData:{ - 'format': 'json' - }, - ajaxOptions:{ - timeout: 5 // Correct option? - }, - 'minLength': 4, - 'selectMode': 'type-ahead', - cache: true, - delay: 300 - }); -}); +if(searx.autocompleter) { + window.addEvent('domready', function() { + new Autocompleter.Request.JSON('q', '/autocompleter', { + postVar:'q', + postData:{ + 'format': 'json' + }, + ajaxOptions:{ + timeout: 5 // Correct option? + }, + 'minLength': 4, + 'selectMode': 'type-ahead', + cache: true, + delay: 300 + }); + }); +} (function (w, d) { 'use strict'; |