diff options
Diffstat (limited to 'searx/static/js/searx.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'; |