summaryrefslogtreecommitdiff
path: root/searx/static/themes/default/js
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-09-22 23:51:07 +0200
committerAdam Tauber <asciimoo@gmail.com>2016-09-22 23:51:07 +0200
commitbee7b497a300622f5ba2b619817f5c89c29ae871 (patch)
tree525c3d85020cedd88663a4bb4a0e18c54500044b /searx/static/themes/default/js
parentaaf5d506e51197603922d7b9d259c0f4e498f62b (diff)
[mod] rename "default" theme to "legacy"
Diffstat (limited to 'searx/static/themes/default/js')
-rw-r--r--searx/static/themes/default/js/searx.js49
1 files changed, 0 insertions, 49 deletions
diff --git a/searx/static/themes/default/js/searx.js b/searx/static/themes/default/js/searx.js
deleted file mode 100644
index d6d5b74bb..000000000
--- a/searx/static/themes/default/js/searx.js
+++ /dev/null
@@ -1,49 +0,0 @@
-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': false,
- cache: true,
- delay: 300
- });
- });
-}
-
-(function (w, d) {
- 'use strict';
- function addListener(el, type, fn) {
- if (el.addEventListener) {
- el.addEventListener(type, fn, false);
- } else {
- el.attachEvent('on' + type, fn);
- }
- }
-
- function placeCursorAtEnd() {
- if (this.setSelectionRange) {
- var len = this.value.length * 2;
- this.setSelectionRange(len, len);
- }
- }
-
- addListener(w, 'load', function () {
- var qinput = d.getElementById('q');
- if (qinput !== null && qinput.value === "") {
- addListener(qinput, 'focus', placeCursorAtEnd);
- qinput.focus();
- }
- });
-
- if (!!('ontouchstart' in window)) {
- document.getElementsByTagName("html")[0].className += " touch";
- }
-
-})(window, document);
-