summaryrefslogtreecommitdiff
path: root/searx/static/themes/simple/js
diff options
context:
space:
mode:
Diffstat (limited to 'searx/static/themes/simple/js')
-rw-r--r--searx/static/themes/simple/js/searx.js101
-rw-r--r--searx/static/themes/simple/js/searx.min.js8
-rw-r--r--searx/static/themes/simple/js/searx.min.js.map2
-rw-r--r--searx/static/themes/simple/js/searx_src/00_searx_toolkit.js11
-rw-r--r--searx/static/themes/simple/js/searx_src/searx_keyboard.js62
-rw-r--r--searx/static/themes/simple/js/searx_src/searx_mapresult.js5
-rw-r--r--searx/static/themes/simple/js/searx_src/searx_search.js23
7 files changed, 145 insertions, 67 deletions
diff --git a/searx/static/themes/simple/js/searx.js b/searx/static/themes/simple/js/searx.js
index 64329fde1..1830977c0 100644
--- a/searx/static/themes/simple/js/searx.js
+++ b/searx/static/themes/simple/js/searx.js
@@ -147,10 +147,19 @@
}
};
+ searx.insertBefore = function (newNode, referenceNode) {
+ element.parentNode.insertBefore(newNode, referenceNode);
+ };
+
+ searx.insertAfter = function(newNode, referenceNode) {
+ referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
+ };
+
searx.on('.close', 'click', function(e) {
var el = e.target || e.srcElement;
- this.parentNode.style.display="None";
+ this.parentNode.classList.add('invisible');
});
+
return searx;
})(window, document, window.searx);
;(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
@@ -958,7 +967,7 @@ module.exports = AutoComplete;
}
};
- searx.on(document, "keyup", function(e) {
+ searx.on(document, "keydown", function(e) {
// check for modifiers so we don't break browser's hotkeys
if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
var tagName = e.target.tagName.toLowerCase();
@@ -968,6 +977,7 @@ module.exports = AutoComplete;
}
} else {
if (e.target === document.body || tagName === 'a' || tagName === 'button') {
+ e.preventDefault();
vimKeys[e.keyCode].fun();
}
}
@@ -1132,13 +1142,7 @@ module.exports = AutoComplete;
};
}
- function toggleHelp() {
- var helpPanel = document.querySelector('#vim-hotkeys-help');
- if (helpPanel.length) {
- helpPanel.classList.toggle('hidden');
- return;
- }
-
+ function initHelpContent(divElement) {
var categories = {};
for (var k in vimKeys) {
@@ -1155,14 +1159,9 @@ module.exports = AutoComplete;
return;
}
- var html = '<div id="vim-hotkeys-help" class="well vim-hotkeys-help">';
- html += '<div class="container-fluid">';
-
- html += '<div class="row">';
- html += '<div class="col-sm-12">';
- html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
- html += '</div>'; // col-sm-12
- html += '</div>'; // row
+ var html = '<a href="#" class="close" aria-label="close" title="close">×</a>';
+ html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
+ html += '<table>';
for (var i = 0; i < sorted.length; i++) {
var cat = categories[sorted[i]];
@@ -1171,13 +1170,11 @@ module.exports = AutoComplete;
var first = i % 2 === 0;
if (first) {
- html += '<div class="row dflex">';
+ html += '<tr>';
}
- html += '<div class="col-sm-' + (first && lastCategory ? 12 : 6) + ' dflex">';
+ html += '<td>';
- html += '<div class="panel panel-default iflex">';
- html += '<div class="panel-heading">' + cat[0].cat + '</div>';
- html += '<div class="panel-body">';
+ html += '<h4>' + cat[0].cat + '</h4>';
html += '<ul class="list-unstyled">';
for (var cj in cat) {
@@ -1185,20 +1182,38 @@ module.exports = AutoComplete;
}
html += '</ul>';
- html += '</div>'; // panel-body
- html += '</div>'; // panel
- html += '</div>'; // col-sm-*
+ html += '</td>'; // col-sm-*
if (!first || lastCategory) {
- html += '</div>'; // row
+ html += '</tr>'; // row
}
}
- html += '</div>'; // container-fluid
- html += '</div>'; // vim-hotkeys-help
+ html += '</table>';
+
+ divElement.innerHTML = html;
+ }
+
+ function toggleHelp() {
+ var helpPanel = document.querySelector('#vim-hotkeys-help');
+ console.log(helpPanel);
+ if (helpPanel === undefined || helpPanel === null) {
+ // first call
+ helpPanel = document.createElement('div');
+ helpPanel.id = 'vim-hotkeys-help';
+ helpPanel.className='dialog-modal';
+ helpPanel.style='width: 40%';
+ initHelpContent(helpPanel);
+ var body = document.getElementsByTagName('body')[0];
+ body.appendChild(helpPanel);
+ } else {
+ // togggle hidden
+ helpPanel.classList.toggle('invisible');
+ return;
+ }
- $('body').append(html);
}
+
});
;/**
* searx is free software: you can redistribute it and/or modify
@@ -1292,13 +1307,14 @@ module.exports = AutoComplete;
newHtml += "</td></tr>";
}
}
- result_table_loadicon.classList.add('invisible');
+ result_table_loadicon.parentNode.removeChild(result_table_loadicon);
result_table.classList.remove('invisible');
result_table.querySelector("tbody").innerHTML = newHtml;
}
})
.catch(function() {
- result_table_loadicon.innerHTML = result_table_loadicon.innerHTML + "<p class=\"text-muted\">could not load data!</p>";
+ result_table_loadicon.classList.remove('invisible');
+ result_table_loadicon.innerHTML = "could not load data!";
});
}
}
@@ -1473,6 +1489,26 @@ module.exports = AutoComplete;
}
}
+ function createClearButton(qinput) {
+ var cs = document.getElementById('clear_search');
+ var updateClearButton = function() {
+ if (qinput.value.length === 0) {
+ cs.classList.add("empty");
+ } else {
+ cs.classList.remove("empty");
+ }
+ };
+
+ // update status, event listener
+ updateClearButton();
+ cs.addEventListener('click', function() {
+ qinput.value='';
+ qinput.focus();
+ updateClearButton();
+ });
+ qinput.addEventListener('keyup', updateClearButton, false);
+ }
+
searx.ready(function() {
qinput = d.getElementById(qinput_id);
@@ -1486,6 +1522,9 @@ module.exports = AutoComplete;
}
if (qinput !== null) {
+ // clear button
+ createClearButton(qinput);
+
// autocompleter
if (searx.autocompleter) {
searx.autocomplete = AutoComplete.call(w, {
diff --git a/searx/static/themes/simple/js/searx.min.js b/searx/static/themes/simple/js/searx.min.js
index aa56dc8d6..f1601cd37 100644
--- a/searx/static/themes/simple/js/searx.min.js
+++ b/searx/static/themes/simple/js/searx.min.js
@@ -1,6 +1,6 @@
-/*! simple/searx.min.js | 03-12-2017 | https://github.com/asciimoo/searx */
+/*! simple/searx.min.js | 14-08-2018 | https://github.com/asciimoo/searx */
-!function(t,e,n){"use strict";function o(t,e,n){try{t.call(e,n)}catch(t){console.log(t)}}t.Element&&function(t){t.matches=t.matches||t.matchesSelector||t.webkitMatchesSelector||t.msMatchesSelector||function(t){for(var e=this,n=(e.parentNode||e.document).querySelectorAll(t),o=-1;n[++o]&&n[o]!=e;);return!!n[o]}}(Element.prototype),n=n||{},n.on=function(t,n,a,i){i=i||!1,"string"!=typeof t?t.addEventListener(n,a,i):e.addEventListener(n,function(n){for(var i=n.target||n.srcElement,r=!1;i&&i.matches&&i!==e&&!(r=i.matches(t));)i=i.parentElement;r&&o(a,i,n)},i)},n.ready=function(e){"loading"!=document.readyState?e.call(t):t.addEventListener("DOMContentLoaded",e.bind(t))},n.http=function(t,e,n){var o=new XMLHttpRequest,a=function(){},i=function(){},r={then:function(t){return a=t,r},catch:function(t){return i=t,r}};try{o.open(t,e,!0),o.onload=function(){200==o.status?a(o.response,o.responseType):i(Error(o.statusText))},o.onerror=function(){i(Error("Network Error"))},o.onabort=function(){i(Error("Transaction is aborted"))},o.send()}catch(t){i(t)}return r},n.loadStyle=function(t){var o=n.staticPath+t,a="style_"+t.replace(".","_"),i=e.getElementById(a);null===i&&((i=e.createElement("link")).setAttribute("id",a),i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("href",o),e.body.appendChild(i))},n.loadScript=function(t,o){var a=n.staticPath+t,i="script_"+t.replace(".","_"),r=e.getElementById(i);if(null===r)(r=e.createElement("script")).setAttribute("id",i),r.setAttribute("src",a),r.onload=o,r.onerror=function(){r.setAttribute("error","1")},e.body.appendChild(r);else if(r.hasAttribute("error"))console.log("callback not executed : script '"+a+"' not loaded.");else try{o.apply(r,[])}catch(t){console.log(t)}},n.on(".close","click",function(t){t.target||t.srcElement;this.parentNode.style.display="None"})}(window,document,window.searx),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).AutoComplete=t()}}(function(){return function t(e,n,o){function a(r,s){if(!n[r]){if(!e[r]){var l="function"==typeof require&&require;if(!s&&l)return l(r,!0);if(i)return i(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[r]={exports:{}};e[r][0].call(c.exports,function(t){var n=e[r][1][t];return a(n||t)},c,c.exports,t,e,n,o)}return n[r].exports}for(var i="function"==typeof require&&require,r=0;r<o.length;r++)a(o[r]);return a}({1:[function(t,e,n){/*
+(function(e,t,n){"use strict";if(e.Element){(function(e){e.matches=e.matches||e.matchesSelector||e.webkitMatchesSelector||e.msMatchesSelector||function(e){var t=this,n=(t.parentNode||t.document).querySelectorAll(e),i=-1;while(n[++i]&&n[i]!=t);return!!n[i]}})(Element.prototype)}function i(e,t,n){try{e.call(t,n)}catch(e){console.log(e)}}n=n||{};n.on=function(e,n,r,a){a=a||false;if(typeof e!=="string"){e.addEventListener(n,r,a)}else{t.addEventListener(n,function(n){var a=n.target||n.srcElement,o=false;while(a&&a.matches&&a!==t&&!(o=a.matches(e)))a=a.parentElement;if(o)i(r,a,n)},a)}};n.ready=function(t){if(document.readyState!="loading"){t.call(e)}else{e.addEventListener("DOMContentLoaded",t.bind(e))}};n.http=function(e,t,n){var i=new XMLHttpRequest,r=function(){},a=function(){},o={then:function(e){r=e;return o},catch:function(e){a=e;return o}};try{i.open(e,t,true);i.onload=function(){if(i.status==200){r(i.response,i.responseType)}else{a(Error(i.statusText))}};i.onerror=function(){a(Error("Network Error"))};i.onabort=function(){a(Error("Transaction is aborted"))};i.send()}catch(e){a(e)}return o};n.loadStyle=function(e){var i=n.staticPath+e,r="style_"+e.replace(".","_"),a=t.getElementById(r);if(a===null){a=t.createElement("link");a.setAttribute("id",r);a.setAttribute("rel","stylesheet");a.setAttribute("type","text/css");a.setAttribute("href",i);t.body.appendChild(a)}};n.loadScript=function(e,i){var r=n.staticPath+e,a="script_"+e.replace(".","_"),o=t.getElementById(a);if(o===null){o=t.createElement("script");o.setAttribute("id",a);o.setAttribute("src",r);o.onload=i;o.onerror=function(){o.setAttribute("error","1")};t.body.appendChild(o)}else if(!o.hasAttribute("error")){try{i.apply(o,[])}catch(e){console.log(e)}}else{console.log("callback not executed : script '"+r+"' not loaded.")}};n.insertBefore=function(e,t){element.parentNode.insertBefore(e,t)};n.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)};n.on(".close","click",function(e){var t=e.target||e.srcElement;this.parentNode.classList.add("invisible")});return n})(window,document,window.searx);(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.AutoComplete=e()}})(function(){var e,t,n;return function e(t,n,i){function r(o,s){if(!n[o]){if(!t[o]){var l=typeof require=="function"&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){var n=t[o][1][e];return r(n?n:e)},c,c.exports,e,t,n,i)}return n[o].exports}var a=typeof require=="function"&&require;for(var o=0;o<i.length;o++)r(i[o]);return r}({1:[function(e,t,n){/*
* @license MIT
*
* Autocomplete.js v2.6.3
@@ -9,7 +9,7 @@
*
* (c) 2017, Baptiste Donaux
*/
-"use strict";var o;!function(t){t[t.AND=0]="AND",t[t.OR=1]="OR"}(o||(o={}));var a;!function(t){t[t.KEYDOWN=0]="KEYDOWN",t[t.KEYUP=1]="KEYUP"}(a||(a={}));var i=function(){function t(e,n){if(void 0===e&&(e={}),void 0===n&&(n="[data-autocomplete]"),Array.isArray(n))n.forEach(function(n){new t(e,n)});else{if("string"!=typeof n){var o=t.merge(t.defaults,e,{DOMResults:document.createElement("div")});return t.prototype.create(o,n),o}var a=document.querySelectorAll(n);Array.prototype.forEach.call(a,function(n){new t(e,n)})}}return t.prototype.create=function(e,n){if(e.Input=n,e.Input.nodeName.match(/^INPUT$/i)&&(!1===e.Input.hasAttribute("type")||e.Input.getAttribute("type").match(/^TEXT|SEARCH$/i))){e.Input.setAttribute("autocomplete","off"),e._Position(e),e.Input.parentNode.appendChild(e.DOMResults),e.$Listeners={blur:e._Blur.bind(e),destroy:t.prototype.destroy.bind(null,e),focus:e._Focus.bind(e),keyup:t.prototype.event.bind(null,e,a.KEYUP),keydown:t.prototype.event.bind(null,e,a.KEYDOWN),position:e._Position.bind(e)};for(var o in e.$Listeners)e.Input.addEventListener(o,e.$Listeners[o])}},t.prototype.getEventsByType=function(t,e){var n={};for(var o in t.KeyboardMappings){var i=a.KEYUP;void 0!==t.KeyboardMappings[o].Event&&(i=t.KeyboardMappings[o].Event),i==e&&(n[o]=t.KeyboardMappings[o])}return n},t.prototype.event=function(e,n,a){for(var i in t.prototype.getEventsByType(e,n)){var r=t.merge({Operator:o.AND},e.KeyboardMappings[i]),s=o.AND==r.Operator;r.Conditions.forEach(function(e){(!0===s&&r.Operator==o.AND||!1===s&&r.Operator==o.OR)&&((e=t.merge({Not:!1},e)).hasOwnProperty("Is")?s=e.Is==a.keyCode?!e.Not:e.Not:e.hasOwnProperty("From")&&e.hasOwnProperty("To")&&(s=a.keyCode>=e.From&&a.keyCode<=e.To?!e.Not:e.Not))}),!0===s&&r.Callback.call(e,a)}},t.prototype.makeRequest=function(t,e){var n=Object.getOwnPropertyNames(t.HttpHeaders),o=new XMLHttpRequest,a=t._HttpMethod(),i=t._Url(),r=t._Pre(),s=encodeURIComponent(t._QueryArg())+"="+encodeURIComponent(r);a.match(/^GET$/i)&&(-1!==i.indexOf("?")?i+="&"+s:i+="?"+s),o.open(a,i,!0);for(var l=n.length-1;l>=0;l--)o.setRequestHeader(n[l],t.HttpHeaders[n[l]]);return o.onreadystatechange=function(){4==o.readyState&&200==o.status&&(t.$Cache[r]=o.response,e(o.response))},o},t.prototype.ajax=function(e,n,o){void 0===o&&(o=!0),e.$AjaxTimer&&window.clearTimeout(e.$AjaxTimer),!0===o?e.$AjaxTimer=window.setTimeout(t.prototype.ajax.bind(null,e,n,!1),e.Delay):(e.Request&&e.Request.abort(),e.Request=n,e.Request.send(e._QueryArg()+"="+e._Pre()))},t.prototype.cache=function(e,n){var o=e._Cache(e._Pre());if(void 0===o){var a=t.prototype.makeRequest(e,n);t.prototype.ajax(e,a)}else n(o)},t.prototype.destroy=function(t){for(var e in t.$Listeners)t.Input.removeEventListener(e,t.$Listeners[e]);t.DOMResults.parentNode.removeChild(t.DOMResults)},t}();i.merge=function(){for(var t,e={},n=0;n<arguments.length;n++)for(t in arguments[n])e[t]=arguments[n][t];return e},i.defaults={Delay:150,EmptyMessage:"No result here",Highlight:{getRegex:function(t){return new RegExp(t,"ig")},transform:function(t){return"<strong>"+t+"</strong>"}},HttpHeaders:{"Content-type":"application/x-www-form-urlencoded"},Limit:0,MinChars:0,HttpMethod:"GET",QueryArg:"q",Url:null,KeyboardMappings:{Enter:{Conditions:[{Is:13,Not:!1}],Callback:function(t){if(-1!=this.DOMResults.getAttribute("class").indexOf("open")){var e=this.DOMResults.querySelector("li.active");null!==e&&(t.preventDefault(),this._Select(e),this.DOMResults.setAttribute("class","autocomplete"))}},Operator:o.AND,Event:a.KEYDOWN},KeyUpAndDown_down:{Conditions:[{Is:38,Not:!1},{Is:40,Not:!1}],Callback:function(t){t.preventDefault()},Operator:o.OR,Event:a.KEYDOWN},KeyUpAndDown_up:{Conditions:[{Is:38,Not:!1},{Is:40,Not:!1}],Callback:function(t){t.preventDefault();var e=this.DOMResults.querySelector("li:first-child:not(.locked)"),n=this.DOMResults.querySelector("li:last-child:not(.locked)"),o=this.DOMResults.querySelector("li.active");if(o){var a=Array.prototype.indexOf.call(o.parentNode.children,o)+(t.keyCode-39),i=this.DOMResults.getElementsByTagName("li").length;a<0?a=i-1:a>=i&&(a=0),o.classList.remove("active"),o.parentElement.children.item(a).classList.add("active")}else n&&38==t.keyCode?n.classList.add("active"):e&&e.classList.add("active")},Operator:o.OR,Event:a.KEYUP},AlphaNum:{Conditions:[{Is:13,Not:!0},{From:35,To:40,Not:!0}],Callback:function(){var t=this.Input.getAttribute("data-autocomplete-old-value"),e=this._Pre();""!==e&&e.length>=this._MinChars()&&(t&&e==t||this.DOMResults.setAttribute("class","autocomplete open"),i.prototype.cache(this,function(t){this._Render(this._Post(t)),this._Open()}.bind(this)))},Operator:o.AND,Event:a.KEYUP}},DOMResults:null,Request:null,Input:null,_EmptyMessage:function(){return this.Input.hasAttribute("data-autocomplete-empty-message")?this.Input.getAttribute("data-autocomplete-empty-message"):!1!==this.EmptyMessage?this.EmptyMessage:""},_Limit:function(){var t=this.Input.getAttribute("data-autocomplete-limit");return isNaN(t)||null===t?this.Limit:parseInt(t,10)},_MinChars:function(){var t=this.Input.getAttribute("data-autocomplete-minchars");return isNaN(t)||null===t?this.MinChars:parseInt(t,10)},_Highlight:function(t){return t.replace(this.Highlight.getRegex(this._Pre()),this.Highlight.transform)},_HttpMethod:function(){return this.Input.hasAttribute("data-autocomplete-method")?this.Input.getAttribute("data-autocomplete-method"):this.HttpMethod},_QueryArg:function(){return this.Input.hasAttribute("data-autocomplete-param-name")?this.Input.getAttribute("data-autocomplete-param-name"):this.QueryArg},_Url:function(){return this.Input.hasAttribute("data-autocomplete")?this.Input.getAttribute("data-autocomplete"):this.Url},_Blur:function(t){if(!0===t)this.DOMResults.setAttribute("class","autocomplete"),this.Input.setAttribute("data-autocomplete-old-value",this.Input.value);else{var e=this;setTimeout(function(){e._Blur(!0)},150)}},_Cache:function(t){return this.$Cache[t]},_Focus:function(){var t=this.Input.getAttribute("data-autocomplete-old-value");(!t||this.Input.value!=t)&&this._MinChars()<=this.Input.value.length&&this.DOMResults.setAttribute("class","autocomplete open")},_Open:function(){var t=this;Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"),function(e){"locked"!=e.getAttribute("class")&&(e.onclick=function(n){t._Select(e)},e.onmouseenter=function(){var n=t.DOMResults.querySelector("li.active");n!==e&&(null!==n&&n.classList.remove("active"),e.classList.add("active"))})})},_Position:function(){this.DOMResults.setAttribute("class","autocomplete"),this.DOMResults.setAttribute("style","top:"+(this.Input.offsetTop+this.Input.offsetHeight)+"px;left:"+this.Input.offsetLeft+"px;width:"+this.Input.clientWidth+"px;")},_Render:function(t){var e;e="string"==typeof t?this._RenderRaw(t):this._RenderResponseItems(t),this.DOMResults.hasChildNodes()&&this.DOMResults.removeChild(this.DOMResults.childNodes[0]),this.DOMResults.appendChild(e)},_RenderResponseItems:function(t){var e=document.createElement("ul"),n=document.createElement("li"),o=this._Limit();o<0?t=t.reverse():0===o&&(o=t.length);for(var a=0;a<Math.min(Math.abs(o),t.length);a++)n.innerHTML=t[a].Label,n.setAttribute("data-autocomplete-value",t[a].Value),e.appendChild(n),n=document.createElement("li");return e},_RenderRaw:function(t){var e=document.createElement("ul"),n=document.createElement("li");if(t.length>0)this.DOMResults.innerHTML=t;else{var o=this._EmptyMessage();""!==o&&(n.innerHTML=o,n.setAttribute("class","locked"),e.appendChild(n))}return e},_Post:function(t){try{var e=[],n=JSON.parse(t);if(0===Object.keys(n).length)return"";if(Array.isArray(n))for(var o=0;o<Object.keys(n).length;o++)e[e.length]={Value:n[o],Label:this._Highlight(n[o])};else for(var a in n)e.push({Value:a,Label:this._Highlight(n[a])});return e}catch(e){return t}},_Pre:function(){return this.Input.value},_Select:function(t){console.log("test test test"),t.hasAttribute("data-autocomplete-value")?this.Input.value=t.getAttribute("data-autocomplete-value"):this.Input.value=t.innerHTML,this.Input.setAttribute("data-autocomplete-old-value",this.Input.value)},$AjaxTimer:null,$Cache:{},$Listeners:{}},e.exports=i},{}]},{},[1])(1)}),/**
+"use strict";var i;(function(e){e[e["AND"]=0]="AND";e[e["OR"]=1]="OR"})(i||(i={}));var r;(function(e){e[e["KEYDOWN"]=0]="KEYDOWN";e[e["KEYUP"]=1]="KEYUP"})(r||(r={}));var a=function(){function e(t,n){if(t===void 0){t={}}if(n===void 0){n="[data-autocomplete]"}if(Array.isArray(n)){n.forEach(function(n){new e(t,n)})}else if(typeof n=="string"){var i=document.querySelectorAll(n);Array.prototype.forEach.call(i,function(n){new e(t,n)})}else{var r=e.merge(e.defaults,t,{DOMResults:document.createElement("div")});e.prototype.create(r,n);return r}}e.prototype.create=function(t,n){t.Input=n;if(t.Input.nodeName.match(/^INPUT$/i)&&(t.Input.hasAttribute("type")===false||t.Input.getAttribute("type").match(/^TEXT|SEARCH$/i))){t.Input.setAttribute("autocomplete","off");t._Position(t);t.Input.parentNode.appendChild(t.DOMResults);t.$Listeners={blur:t._Blur.bind(t),destroy:e.prototype.destroy.bind(null,t),focus:t._Focus.bind(t),keyup:e.prototype.event.bind(null,t,r.KEYUP),keydown:e.prototype.event.bind(null,t,r.KEYDOWN),position:t._Position.bind(t)};for(var i in t.$Listeners){t.Input.addEventListener(i,t.$Listeners[i])}}};e.prototype.getEventsByType=function(e,t){var n={};for(var i in e.KeyboardMappings){var a=r.KEYUP;if(e.KeyboardMappings[i].Event!==undefined){a=e.KeyboardMappings[i].Event}if(a==t){n[i]=e.KeyboardMappings[i]}}return n};e.prototype.event=function(t,n,r){var a=function(t){if(l===true&&s.Operator==i.AND||l===false&&s.Operator==i.OR){t=e.merge({Not:false},t);if(t.hasOwnProperty("Is")){if(t.Is==r.keyCode){l=!t.Not}else{l=t.Not}}else if(t.hasOwnProperty("From")&&t.hasOwnProperty("To")){if(r.keyCode>=t.From&&r.keyCode<=t.To){l=!t.Not}else{l=t.Not}}}};for(var o in e.prototype.getEventsByType(t,n)){var s=e.merge({Operator:i.AND},t.KeyboardMappings[o]),l=i.AND==s.Operator;s.Conditions.forEach(a);if(l===true){s.Callback.call(t,r)}}};e.prototype.makeRequest=function(e,t){var n=Object.getOwnPropertyNames(e.HttpHeaders),i=new XMLHttpRequest,r=e._HttpMethod(),a=e._Url(),o=e._Pre(),s=encodeURIComponent(e._QueryArg())+"="+encodeURIComponent(o);if(r.match(/^GET$/i)){if(a.indexOf("?")!==-1){a+="&"+s}else{a+="?"+s}}i.open(r,a,true);for(var l=n.length-1;l>=0;l--){i.setRequestHeader(n[l],e.HttpHeaders[n[l]])}i.onreadystatechange=function(){if(i.readyState==4&&i.status==200){e.$Cache[o]=i.response;t(i.response)}};return i};e.prototype.ajax=function(t,n,i){if(i===void 0){i=true}if(t.$AjaxTimer){window.clearTimeout(t.$AjaxTimer)}if(i===true){t.$AjaxTimer=window.setTimeout(e.prototype.ajax.bind(null,t,n,false),t.Delay)}else{if(t.Request){t.Request.abort()}t.Request=n;t.Request.send(t._QueryArg()+"="+t._Pre())}};e.prototype.cache=function(t,n){var i=t._Cache(t._Pre());if(i===undefined){var r=e.prototype.makeRequest(t,n);e.prototype.ajax(t,r)}else{n(i)}};e.prototype.destroy=function(e){for(var t in e.$Listeners){e.Input.removeEventListener(t,e.$Listeners[t])}e.DOMResults.parentNode.removeChild(e.DOMResults)};return e}();a.merge=function(){var e={},t;for(var n=0;n<arguments.length;n++){for(t in arguments[n]){e[t]=arguments[n][t]}}return e};a.defaults={Delay:150,EmptyMessage:"No result here",Highlight:{getRegex:function(e){return new RegExp(e,"ig")},transform:function(e){return"<strong>"+e+"</strong>"}},HttpHeaders:{"Content-type":"application/x-www-form-urlencoded"},Limit:0,MinChars:0,HttpMethod:"GET",QueryArg:"q",Url:null,KeyboardMappings:{Enter:{Conditions:[{Is:13,Not:false}],Callback:function(e){if(this.DOMResults.getAttribute("class").indexOf("open")!=-1){var t=this.DOMResults.querySelector("li.active");if(t!==null){e.preventDefault();this._Select(t);this.DOMResults.setAttribute("class","autocomplete")}}},Operator:i.AND,Event:r.KEYDOWN},KeyUpAndDown_down:{Conditions:[{Is:38,Not:false},{Is:40,Not:false}],Callback:function(e){e.preventDefault()},Operator:i.OR,Event:r.KEYDOWN},KeyUpAndDown_up:{Conditions:[{Is:38,Not:false},{Is:40,Not:false}],Callback:function(e){e.preventDefault();var t=this.DOMResults.querySelector("li:first-child:not(.locked)"),n=this.DOMResults.querySelector("li:last-child:not(.locked)"),i=this.DOMResults.querySelector("li.active");if(i){var r=Array.prototype.indexOf.call(i.parentNode.children,i),a=r+(e.keyCode-39),o=this.DOMResults.getElementsByTagName("li").length;if(a<0){a=o-1}else if(a>=o){a=0}i.classList.remove("active");i.parentElement.children.item(a).classList.add("active")}else if(n&&e.keyCode==38){n.classList.add("active")}else if(t){t.classList.add("active")}},Operator:i.OR,Event:r.KEYUP},AlphaNum:{Conditions:[{Is:13,Not:true},{From:35,To:40,Not:true}],Callback:function(){var e=this.Input.getAttribute("data-autocomplete-old-value"),t=this._Pre();if(t!==""&&t.length>=this._MinChars()){if(!e||t!=e){this.DOMResults.setAttribute("class","autocomplete open")}a.prototype.cache(this,function(e){this._Render(this._Post(e));this._Open()}.bind(this))}},Operator:i.AND,Event:r.KEYUP}},DOMResults:null,Request:null,Input:null,_EmptyMessage:function(){var e="";if(this.Input.hasAttribute("data-autocomplete-empty-message")){e=this.Input.getAttribute("data-autocomplete-empty-message")}else if(this.EmptyMessage!==false){e=this.EmptyMessage}else{e=""}return e},_Limit:function(){var e=this.Input.getAttribute("data-autocomplete-limit");if(isNaN(e)||e===null){return this.Limit}return parseInt(e,10)},_MinChars:function(){var e=this.Input.getAttribute("data-autocomplete-minchars");if(isNaN(e)||e===null){return this.MinChars}return parseInt(e,10)},_Highlight:function(e){return e.replace(this.Highlight.getRegex(this._Pre()),this.Highlight.transform)},_HttpMethod:function(){if(this.Input.hasAttribute("data-autocomplete-method")){return this.Input.getAttribute("data-autocomplete-method")}return this.HttpMethod},_QueryArg:function(){if(this.Input.hasAttribute("data-autocomplete-param-name")){return this.Input.getAttribute("data-autocomplete-param-name")}return this.QueryArg},_Url:function(){if(this.Input.hasAttribute("data-autocomplete")){return this.Input.getAttribute("data-autocomplete")}return this.Url},_Blur:function(e){if(e===true){this.DOMResults.setAttribute("class","autocomplete");this.Input.setAttribute("data-autocomplete-old-value",this.Input.value)}else{var t=this;setTimeout(function(){t._Blur(true)},150)}},_Cache:function(e){return this.$Cache[e]},_Focus:function(){var e=this.Input.getAttribute("data-autocomplete-old-value");if((!e||this.Input.value!=e)&&this._MinChars()<=this.Input.value.length){this.DOMResults.setAttribute("class","autocomplete open")}},_Open:function(){var e=this;Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"),function(t){if(t.getAttribute("class")!="locked"){t.onclick=function(n){e._Select(t)};t.onmouseenter=function(){var n=e.DOMResults.querySelector("li.active");if(n!==t){if(n!==null){n.classList.remove("active")}t.classList.add("active")}}}})},_Position:function(){this.DOMResults.setAttribute("class","autocomplete");this.DOMResults.setAttribute("style","top:"+(this.Input.offsetTop+this.Input.offsetHeight)+"px;left:"+this.Input.offsetLeft+"px;width:"+this.Input.clientWidth+"px;")},_Render:function(e){var t;if(typeof e=="string"){t=this._RenderRaw(e)}else{t=this._RenderResponseItems(e)}if(this.DOMResults.hasChildNodes()){this.DOMResults.removeChild(this.DOMResults.childNodes[0])}this.DOMResults.appendChild(t)},_RenderResponseItems:function(e){var t=document.createElement("ul"),n=document.createElement("li"),i=this._Limit();if(i<0){e=e.reverse()}else if(i===0){i=e.length}for(var r=0;r<Math.min(Math.abs(i),e.length);r++){n.innerHTML=e[r].Label;n.setAttribute("data-autocomplete-value",e[r].Value);t.appendChild(n);n=document.createElement("li")}return t},_RenderRaw:function(e){var t=document.createElement("ul"),n=document.createElement("li");if(e.length>0){this.DOMResults.innerHTML=e}else{var i=this._EmptyMessage();if(i!==""){n.innerHTML=i;n.setAttribute("class","locked");t.appendChild(n)}}return t},_Post:function(e){try{var t=[];var n=JSON.parse(e);if(Object.keys(n).length===0){return""}if(Array.isArray(n)){for(var i=0;i<Object.keys(n).length;i++){t[t.length]={Value:n[i],Label:this._Highlight(n[i])}}}else{for(var r in n){t.push({Value:r,Label:this._Highlight(n[r])})}}return t}catch(t){return e}},_Pre:function(){return this.Input.value},_Select:function(e){console.log("test test test");if(e.hasAttribute("data-autocomplete-value")){this.Input.value=e.getAttribute("data-autocomplete-value")}else{this.Input.value=e.innerHTML}this.Input.setAttribute("data-autocomplete-old-value",this.Input.value)},$AjaxTimer:null,$Cache:{},$Listeners:{}};t.exports=a},{}]},{},[1])(1)});/**
*
* Google Image Layout v0.0.1
* Description, by Anh Trinh.
@@ -19,5 +19,5 @@
* @license Free to use under the MIT License.
*
*/
-function(t,e){"use strict";function n(t,e,n,o){this.container_selector=t,this.results_selector=e,this.img_selector=n,this.margin=10,this.maxHeight=o,this._alignAllDone=!0}n.prototype._getHeigth=function(t,e){var n,o=0;e-=t.length*this.margin;for(var a=0;a<t.length;a++)(n=t[a]).naturalWidth>0&&n.naturalHeight>0?o+=n.naturalWidth/n.naturalHeight:o+=1;return e/o},n.prototype._setSize=function(t,e){for(var n,o,a=t.length,i=0;i<a;i++)o=(n=t[i]).naturalWidth>0&&n.naturalHeight>0?e*n.naturalWidth/n.naturalHeight:e,n.style.width=o+"px",n.style.height=e+"px",n.style.marginLeft="3px",n.style.marginTop="3px",n.style.marginRight=this.margin-7+"px",n.style.marginBottom=this.margin-7+"px"},n.prototype._alignImgs=function(t){var n,o,a=e.querySelector(this.container_selector).clientWidth;t:for(;t.length>0;){for(var i=1;i<=t.length;i++)if(n=t.slice(0,i),(o=this._getHeigth(n,a))<this.maxHeight){this._setSize(n,o),t=t.slice(i);continue t}this._setSize(n,Math.min(this.maxHeight,o));break}},n.prototype.align=function(t){for(var n=e.querySelectorAll(this.results_selector),o=n.length,a=null,i=null,r=[],s=0;s<o;s++)(i=n[s]).previousElementSibling!==a&&r.length>0&&(this._alignImgs(r),r=[]),r.push(i.querySelector(this.img_selector)),a=i;r.length>0&&this._alignImgs(r)},n.prototype.watch=function(){function n(t){i._alignAllDone&&(i._alignAllDone=!1,setTimeout(function(){i.align(),i._alignAllDone=!0},100))}var o,a,i=this,r=e.querySelectorAll(this.results_selector),s=r.length;for(t.addEventListener("resize",n),t.addEventListener("pageshow",function(t){i.align()}),o=0;o<s;o++)void 0!==(a=r[o].querySelector(this.img_selector))&&(a.addEventListener("load",n),a.addEventListener("error",n))},t.searx.ImageLayout=n}(window,document),searx.ready(function(){function t(t){return function(e){var o=document.querySelector(".result[data-vim-selected]"),a=t;if(null===o){if(null===(o=document.querySelector(".result")))return;"down"!==t&&"up"!==t||(a=o)}var i,r=document.querySelectorAll(".result");if("string"!=typeof a)i=a;else switch(a){case"visible":for(var s=document.documentElement.scrollTop||document.body.scrollTop,l=s+document.documentElement.clientHeight,u=0;u<r.length;u++){var c=(i=r[u]).offsetTop;if(c+i.clientHeight<=l&&c>s)break}break;case"down":null===(i=o.nextElementSibling)&&(i=r[0]);break;case"up":null===(i=o.previousElementSibling)&&(i=r[r.length-1]);break;case"bottom":i=r[r.length-1];break;case"top":default:i=r[0]}if(i){o.removeAttribute("data-vim-selected"),i.setAttribute("data-vim-selected","true");var d=i.querySelector("h3 a")||i.querySelector("a");null!==d&&d.focus(),e||n()}}}function e(t){return function(){var e=$('div#pagination button[type="submit"]');2===e.length?t>=0&&t<e.length?e[t].click():console.log("pageButtonClick(): invalid argument"):console.log("page navigation with this theme is not supported")}}function n(){var t=document.querySelector(".result[data-vim-selected]");if(null!==t){var e=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight,o=t.offsetTop,a=o+t.clientHeight;null===t.previousElementSibling&&a<n?window.scroll(window.scrollX,0):e>o-120?window.scroll(window.scrollX,o-120):e+n<a+120&&window.scroll(window.scrollX,a-n+120)}}function o(e){return function(){window.scrollBy(0,e),t("visible")()}}function a(e,n){return function(){window.scrollTo(0,e),t(n)()}}function i(t){return function(){var e=document.querySelector(".result[data-vim-selected] h3 a");if(null!==e){var n=e.getAttribute("href");t?window.open(n):window.location.href=n}}}searx.on(".result","click",function(){t(this)(!0)}),searx.on(".result a","focus",function(e){for(var n=e.target;void 0!==n;){if(n.classList.contains("result")){null===n.getAttribute("data-vim-selected")&&t(n)(!0);break}n=n.parentNode}},!0);var r={27:{key:"Escape",fun:function(){document.activeElement&&document.activeElement.blur()},des:"remove focus from the focused input",cat:"Control"},73:{key:"i",fun:function(){window.scrollTo(0,0),document.querySelector("#q").focus()},des:"focus on the search input",cat:"Control"},66:{key:"b",fun:o(-window.innerHeight),des:"scroll one page up",cat:"Navigation"},70:{key:"f",fun:o(window.innerHeight),des:"scroll one page down",cat:"Navigation"},85:{key:"u",fun:o(-window.innerHeight/2),des:"scroll half a page up",cat:"Navigation"},68:{key:"d",fun:o(window.innerHeight/2),des:"scroll half a page down",cat:"Navigation"},71:{key:"g",fun:a(-document.body.scrollHeight,"top"),des:"scroll to the top of the page",cat:"Navigation"},86:{key:"v",fun:a(document.body.scrollHeight,"bottom"),des:"scroll to the bottom of the page",cat:"Navigation"},75:{key:"k",fun:t("up"),des:"select previous search result",cat:"Results"},74:{key:"j",fun:t("down"),des:"select next search result",cat:"Results"},80:{key:"p",fun:e(0),des:"go to previous page",cat:"Results"},78:{key:"n",fun:e(1),des:"go to next page",cat:"Results"},79:{key:"o",fun:i(!1),des:"open search result",cat:"Results"},84:{key:"t",fun:i(!0),des:"open the result in a new tab",cat:"Results"},82:{key:"r",fun:function(){document.location.reload(!0)},des:"reload page from the server",cat:"Control"},72:{key:"h",fun:function(){var t=document.querySelector("#vim-hotkeys-help");if(t.length)t.classList.toggle("hidden");else{var e={};for(var n in r){var o=r[n];e[o.cat]=e[o.cat]||[],e[o.cat].push(o)}var a=Object.keys(e).sort(function(t,n){return e[n].length-e[t].length});if(0!==a.length){var i='<div id="vim-hotkeys-help" class="well vim-hotkeys-help">';i+='<div class="container-fluid">',i+='<div class="row">',i+='<div class="col-sm-12">',i+="<h3>How to navigate searx with Vim-like hotkeys</h3>",i+="</div>",i+="</div>";for(var s=0;s<a.length;s++){var l=e[a[s]],u=s===a.length-1,c=s%2==0;c&&(i+='<div class="row dflex">'),i+='<div class="col-sm-'+(c&&u?12:6)+' dflex">',i+='<div class="panel panel-default iflex">',i+='<div class="panel-heading">'+l[0].cat+"</div>",i+='<div class="panel-body">',i+='<ul class="list-unstyled">';for(var d in l)i+="<li><kbd>"+l[d].key+"</kbd> "+l[d].des+"</li>";i+="</ul>",i+="</div>",i+="</div>",i+="</div>",c&&!u||(i+="</div>")}i+="</div>",i+="</div>",$("body").append(i)}}},des:"toggle help window",cat:"Other"}};searx.on(document,"keyup",function(t){if(r.hasOwnProperty(t.keyCode)&&!t.ctrlKey&&!t.altKey&&!t.shiftKey&&!t.metaKey){var e=t.target.tagName.toLowerCase();27===t.keyCode?"input"!==e&&"select"!==e&&"textarea"!==e||r[t.keyCode].fun():t.target!==document.body&&"a"!==e&&"button"!==e||r[t.keyCode].fun()}})}),function(t,e,n){"use strict";n.ready(function(){n.on(".searx_overpass_request","click",function(t){this.classList.remove("searx_overpass_request");var o="https://overpass-api.de/api/interpreter?data=[out:json][timeout:25];(",a=this.dataset.osmId,i=this.dataset.osmType,r=e.querySelector("#"+this.dataset.resultTable),s=e.querySelector("#"+this.dataset.resultTableLoadicon),l=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(a&&i&&r){var u=null;switch(i){case"node":u=o+"node("+a+"););out meta;";break;case"way":u=o+"way("+a+"););out meta;";break;case"relation":u=o+"relation("+a+"););out meta;"}u&&n.http("GET",u).then(function(t,e){if((t=JSON.parse(t))&&t.elements&&t.elements[0]){var n=t.elements[0],o="";for(var a in n.tags)if(null===n.tags.name||-1==l.indexOf(a)){switch(o+="<tr><td>"+a+"</td><td>",a){case"phone":case"fax":o+='<a href="tel:'+n.tags[a].replace(/ /g,"")+'">'+n.tags[a]+"</a>";break;case"email":o+='<a href="mailto:'+n.tags[a]+'">'+n.tags[a]+"</a>";break;case"website":case"url":o+='<a href="'+n.tags[a]+'">'+n.tags[a]+"</a>";break;case"wikidata":o+='<a href="https://www.wikidata.org/wiki/'+n.tags[a]+'">'+n.tags[a]+"</a>";break;case"wikipedia":if(-1!=n.tags[a].indexOf(":")){o+='<a href="https://'+n.tags[a].substring(0,n.tags[a].indexOf(":"))+".wikipedia.org/wiki/"+n.tags[a].substring(n.tags[a].indexOf(":")+1)+'">'+n.tags[a]+"</a>";break}default:o+=n.tags[a]}o+="</td></tr>"}s.classList.add("invisible"),r.classList.remove("invisible"),r.querySelector("tbody").innerHTML=o}}).catch(function(){s.innerHTML=s.innerHTML+'<p class="text-muted">could not load data!</p>'})}t.preventDefault()}),n.on(".searx_init_map","click",function(t){this.classList.remove("searx_init_map");var e=this.dataset.leafletTarget,o=parseFloat(this.dataset.mapLon),a=parseFloat(this.dataset.mapLat),i=parseFloat(this.dataset.mapZoom),r=JSON.parse(this.dataset.mapBoundingbox),s=JSON.parse(this.dataset.mapGeojson);n.loadStyle("leaflet/leaflet.css"),n.loadScript("leaflet/leaflet.js",function(){var t=null;if(r){var n=L.latLng(r[0],r[2]),l=L.latLng(r[1],r[3]);t=L.latLngBounds(n,l)}var u=L.map(e),c=new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'});new L.TileLayer("https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'});t?setTimeout(function(){u.fitBounds(t,{maxZoom:17})},0):o&&a&&(i?u.setView(new L.latLng(a,o),i):u.setView(new L.latLng(a,o),8)),u.addLayer(c);var d={"OSM Mapnik":c};L.control.layers(d).addTo(u),s&&L.geoJson(s).addTo(u)}),t.preventDefault()})})}(window,document,window.searx),function(t,e,n){"use strict";n.ready(function(){n.image_thumbnail_layout=new n.ImageLayout("#urls","#urls .result-images","img.image_thumbnail",200),n.image_thumbnail_layout.watch(),n.on(".btn-collapse","click",function(t){var n=this.getAttribute("data-btn-text-collapsed"),o=this.getAttribute("data-btn-text-not-collapsed"),a=this.getAttribute("data-target"),i=e.querySelector(a),r=this.innerHTML;r=this.classList.contains("collapsed")?r.replace(n,o):r.replace(o,n),this.innerHTML=r,this.classList.toggle("collapsed"),i.classList.toggle("invisible")}),n.on(".media-loader","click",function(t){var n=this.getAttribute("data-target"),o=e.querySelector(n+" > iframe"),a=o.getAttribute("src");null!==a&&void 0!==a&&!1!==a||o.setAttribute("src",o.getAttribute("data-src"))}),t.addEventListener("scroll",function(){var t=e.getElementById("backToTop"),n=document.documentElement.scrollTop||document.body.scrollTop;null!==t&&(t.style.opacity=n>=200?1:0)})})}(window,document,window.searx),function(t,e,n){"use strict";function o(t){if(t.setSelectionRange){var e=t.value.length;t.setSelectionRange(e,e)}}function a(){if(i.value.length>0){var t=document.getElementById("search");setTimeout(t.submit.bind(t),0)}}var i,r=!0;n.ready(function(){null!==(i=e.getElementById("q"))&&(n.autocompleter&&(n.autocomplete=AutoComplete.call(t,{Url:"./autocompleter",EmptyMessage:n.noItemFound,HttpMethod:n.method,MinChars:4,Delay:300},"#q"),t.addEventListener("resize",function(){var t=new CustomEvent("position");i.dispatchEvent(t)})),i.addEventListener("focus",function(t){r&&(o(i),r=!1)},!1),i.focus()),null!==i&&n.search_on_category_select&&(e.querySelector(".help").className="invisible",n.on("#categories input","change",function(t){var n,o=e.querySelectorAll('#categories input[type="checkbox"]');for(n=0;n<o.length;n++)o[n]!==this&&o[n].checked&&o[n].click();return this.checked||this.click(),a(),!1}),n.on(e.getElementById("time_range"),"change",a),n.on(e.getElementById("language"),"change",a))})}(window,document,window.searx);
+(function(e,t){"use strict";function n(e,t,n,i){this.container_selector=e;this.results_selector=t;this.img_selector=n;this.margin=10;this.maxHeight=i;this._alignAllDone=true}n.prototype._getHeigth=function(e,t){var n=0,i;t-=e.length*this.margin;for(var r=0;r<e.length;r++){i=e[r];if(i.naturalWidth>0&&i.naturalHeight>0){n+=i.naturalWidth/i.naturalHeight}else{n+=1}}return t/n};n.prototype._setSize=function(e,t){var n,i,r=e.length;for(var a=0;a<r;a++){n=e[a];if(n.naturalWidth>0&&n.naturalHeight>0){i=t*n.naturalWidth/n.naturalHeight}else{i=t}n.style.width=i+"px";n.style.height=t+"px";n.style.marginLeft="3px";n.style.marginTop="3px";n.style.marginRight=this.margin-7+"px";n.style.marginBottom=this.margin-7+"px"}};n.prototype._alignImgs=function(e){var n,i,r=t.querySelector(this.container_selector).clientWidth;e:while(e.length>0){for(var a=1;a<=e.length;a++){n=e.slice(0,a);i=this._getHeigth(n,r);if(i<this.maxHeight){this._setSize(n,i);e=e.slice(a);continue e}}this._setSize(n,Math.min(this.maxHeight,i));break}};n.prototype.align=function(e){var n=t.querySelectorAll(this.results_selector),i=n.length,r=null,a=null,o=[];for(var s=0;s<i;s++){a=n[s];if(a.previousElementSibling!==r&&o.length>0){this._alignImgs(o);o=[]}o.push(a.querySelector(this.img_selector));r=a}if(o.length>0){this._alignImgs(o)}};n.prototype.watch=function(){var n,i,r,a,o=this,s=t.querySelectorAll(this.results_selector),l=s.length;function u(e){o.align()}function c(e){if(o._alignAllDone){o._alignAllDone=false;setTimeout(function(){o.align();o._alignAllDone=true},100)}}e.addEventListener("resize",c);e.addEventListener("pageshow",u);for(n=0;n<l;n++){i=s[n].querySelector(this.img_selector);if(typeof i!=="undefined"){i.addEventListener("load",c);i.addEventListener("error",c)}}};e.searx.ImageLayout=n})(window,document);searx.ready(function(){searx.on(".result","click",function(){t(this)(true)});searx.on(".result a","focus",function(e){var n=e.target;while(n!==undefined){if(n.classList.contains("result")){if(n.getAttribute("data-vim-selected")===null){t(n)(true)}break}n=n.parentNode}},true);var e={27:{key:"Escape",fun:i,des:"remove focus from the focused input",cat:"Control"},73:{key:"i",fun:l,des:"focus on the search input",cat:"Control"},66:{key:"b",fun:o(-window.innerHeight),des:"scroll one page up",cat:"Navigation"},70:{key:"f",fun:o(window.innerHeight),des:"scroll one page down",cat:"Navigation"},85:{key:"u",fun:o(-window.innerHeight/2),des:"scroll half a page up",cat:"Navigation"},68:{key:"d",fun:o(window.innerHeight/2),des:"scroll half a page down",cat:"Navigation"},71:{key:"g",fun:s(-document.body.scrollHeight,"top"),des:"scroll to the top of the page",cat:"Navigation"},86:{key:"v",fun:s(document.body.scrollHeight,"bottom"),des:"scroll to the bottom of the page",cat:"Navigation"},75:{key:"k",fun:t("up"),des:"select previous search result",cat:"Results"},74:{key:"j",fun:t("down"),des:"select next search result",cat:"Results"},80:{key:"p",fun:r(0),des:"go to previous page",cat:"Results"},78:{key:"n",fun:r(1),des:"go to next page",cat:"Results"},79:{key:"o",fun:u(false),des:"open search result",cat:"Results"},84:{key:"t",fun:u(true),des:"open the result in a new tab",cat:"Results"},82:{key:"r",fun:n,des:"reload page from the server",cat:"Control"},72:{key:"h",fun:d,des:"toggle help window",cat:"Other"}};searx.on(document,"keydown",function(t){if(e.hasOwnProperty(t.keyCode)&&!t.ctrlKey&&!t.altKey&&!t.shiftKey&&!t.metaKey){var n=t.target.tagName.toLowerCase();if(t.keyCode===27){if(n==="input"||n==="select"||n==="textarea"){e[t.keyCode].fun()}}else{if(t.target===document.body||n==="a"||n==="button"){t.preventDefault();e[t.keyCode].fun()}}}});function t(e){return function(t){var n=document.querySelector(".result[data-vim-selected]"),i=e;if(n===null){n=document.querySelector(".result");if(n===null){return}if(e==="down"||e==="up"){i=n}}var r,o=document.querySelectorAll(".result");if(typeof i!=="string"){r=i}else{switch(i){case"visible":var s=document.documentElement.scrollTop||document.body.scrollTop;var l=s+document.documentElement.clientHeight;for(var u=0;u<o.length;u++){r=o[u];var c=r.offsetTop;var d=c+r.clientHeight;if(d<=l&&c>s){break}}break;case"down":r=n.nextElementSibling;if(r===null){r=o[0]}break;case"up":r=n.previousElementSibling;if(r===null){r=o[o.length-1]}break;case"bottom":r=o[o.length-1];break;case"top":default:r=o[0]}}if(r){n.removeAttribute("data-vim-selected");r.setAttribute("data-vim-selected","true");var f=r.querySelector("h3 a")||r.querySelector("a");if(f!==null){f.focus()}if(!t){a()}}}}function n(){document.location.reload(true)}function i(){if(document.activeElement){document.activeElement.blur()}}function r(e){return function(){var t=$('div#pagination button[type="submit"]');if(t.length!==2){console.log("page navigation with this theme is not supported");return}if(e>=0&&e<t.length){t[e].click()}else{console.log("pageButtonClick(): invalid argument")}}}function a(){var e=document.querySelector(".result[data-vim-selected]");if(e===null){return}var t=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight,i=e.offsetTop,r=i+e.clientHeight,a=120;if(e.previousElementSibling===null&&r<n){window.scroll(window.scrollX,0);return}if(t>i-a){window.scroll(window.scrollX,i-a)}else{var o=t+n;if(o<r+a){window.scroll(window.scrollX,r-n+a)}}}function o(e){return function(){window.scrollBy(0,e);t("visible")()}}function s(e,n){return function(){window.scrollTo(0,e);t(n)()}}function l(){window.scrollTo(0,0);document.querySelector("#q").focus()}function u(e){return function(){var t=document.querySelector(".result[data-vim-selected] h3 a");if(t!==null){var n=t.getAttribute("href");if(e){window.open(n)}else{window.location.href=n}}}}function c(t){var n={};for(var i in e){var r=e[i];n[r.cat]=n[r.cat]||[];n[r.cat].push(r)}var a=Object.keys(n).sort(function(e,t){return n[t].length-n[e].length});if(a.length===0){return}var o='<a href="#" class="close" aria-label="close" title="close">×</a>';o+="<h3>How to navigate searx with Vim-like hotkeys</h3>";o+="<table>";for(var s=0;s<a.length;s++){var l=n[a[s]];var u=s===a.length-1;var c=s%2===0;if(c){o+="<tr>"}o+="<td>";o+="<h4>"+l[0].cat+"</h4>";o+='<ul class="list-unstyled">';for(var d in l){o+="<li><kbd>"+l[d].key+"</kbd> "+l[d].des+"</li>"}o+="</ul>";o+="</td>";if(!c||u){o+="</tr>"}}o+="</table>";t.innerHTML=o}function d(){var e=document.querySelector("#vim-hotkeys-help");console.log(e);if(e===undefined||e===null){e=document.createElement("div");e.id="vim-hotkeys-help";e.className="dialog-modal";e.style="width: 40%";c(e);var t=document.getElementsByTagName("body")[0];t.appendChild(e)}else{e.classList.toggle("invisible");return}}});(function(e,t,n){"use strict";n.ready(function(){n.on(".searx_overpass_request","click",function(e){this.classList.remove("searx_overpass_request");var i="https://overpass-api.de/api/interpreter?data=";var r=i+"[out:json][timeout:25];(";var a=");out meta;";var o=this.dataset.osmId;var s=this.dataset.osmType;var l=t.querySelector("#"+this.dataset.resultTable);var u=t.querySelector("#"+this.dataset.resultTableLoadicon);var c=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(o&&s&&l){var d=null;switch(s){case"node":d=r+"node("+o+");"+a;break;case"way":d=r+"way("+o+");"+a;break;case"relation":d=r+"relation("+o+");"+a;break;default:break}if(d){n.http("GET",d).then(function(e,t){e=JSON.parse(e);if(e&&e.elements&&e.elements[0]){var n=e.elements[0];var i="";for(var r in n.tags){if(n.tags.name===null||c.indexOf(r)==-1){i+="<tr><td>"+r+"</td><td>";switch(r){case"phone":case"fax":i+='<a href="tel:'+n.tags[r].replace(/ /g,"")+'">'+n.tags[r]+"</a>";break;case"email":i+='<a href="mailto:'+n.tags[r]+'">'+n.tags[r]+"</a>";break;case"website":case"url":i+='<a href="'+n.tags[r]+'">'+n.tags[r]+"</a>";break;case"wikidata":i+='<a href="https://www.wikidata.org/wiki/'+n.tags[r]+'">'+n.tags[r]+"</a>";break;case"wikipedia":if(n.tags[r].indexOf(":")!=-1){i+='<a href="https://'+n.tags[r].substring(0,n.tags[r].indexOf(":"))+".wikipedia.org/wiki/"+n.tags[r].substring(n.tags[r].indexOf(":")+1)+'">'+n.tags[r]+"</a>";break}default:i+=n.tags[r];break}i+="</td></tr>"}}u.parentNode.removeChild(u);l.classList.remove("invisible");l.querySelector("tbody").innerHTML=i}}).catch(function(){u.classList.remove("invisible");u.innerHTML="could not load data!"})}}e.preventDefault()});n.on(".searx_init_map","click",function(e){this.classList.remove("searx_init_map");var t=this.dataset.leafletTarget;var i=parseFloat(this.dataset.mapLon);var r=parseFloat(this.dataset.mapLat);var a=parseFloat(this.dataset.mapZoom);var o=JSON.parse(this.dataset.mapBoundingbox);var s=JSON.parse(this.dataset.mapGeojson);n.loadStyle("leaflet/leaflet.css");n.loadScript("leaflet/leaflet.js",function(){var e=null;if(o){var n=L.latLng(o[0],o[2]);var l=L.latLng(o[1],o[3]);e=L.latLngBounds(n,l)}var u=L.map(t);var c="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";var d='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';var f=new L.TileLayer(c,{minZoom:1,maxZoom:19,attribution:d});var p="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png";var h='Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';var m=new L.TileLayer(p,{minZoom:1,maxZoom:19,attribution:h});if(e){setTimeout(function(){u.fitBounds(e,{maxZoom:17})},0)}else if(i&&r){if(a){u.setView(new L.latLng(r,i),a)}else{u.setView(new L.latLng(r,i),8)}}u.addLayer(f);var g={"OSM Mapnik":f};L.control.layers(g).addTo(u);if(s){L.geoJson(s).addTo(u)}});e.preventDefault()})})})(window,document,window.searx);(function(e,t,n){"use strict";n.ready(function(){n.image_thumbnail_layout=new n.ImageLayout("#urls","#urls .result-images","img.image_thumbnail",200);n.image_thumbnail_layout.watch();n.on(".btn-collapse","click",function(e){var n=this.getAttribute("data-btn-text-collapsed");var i=this.getAttribute("data-btn-text-not-collapsed");var r=this.getAttribute("data-target");var a=t.querySelector(r);var o=this.innerHTML;if(this.classList.contains("collapsed")){o=o.replace(n,i)}else{o=o.replace(i,n)}this.innerHTML=o;this.classList.toggle("collapsed");a.classList.toggle("invisible")});n.on(".media-loader","click",function(e){var n=this.getAttribute("data-target");var i=t.querySelector(n+" > iframe");var r=i.getAttribute("src");if(r===null||r===undefined||r===false){i.setAttribute("src",i.getAttribute("data-src"))}});e.addEventListener("scroll",function(){var e=t.getElementById("backToTop"),n=document.documentElement.scrollTop||document.body.scrollTop;if(e!==null){if(n>=200){e.style.opacity=1}else{e.style.opacity=0}}})})})(window,document,window.searx);(function(e,t,n){"use strict";var i=true,r="q",a;function o(e){if(e.setSelectionRange){var t=e.value.length;e.setSelectionRange(t,t)}}function s(){if(a.value.length>0){var e=document.getElementById("search");setTimeout(e.submit.bind(e),0)}}function l(e){var t=document.getElementById("clear_search");var n=function(){if(e.value.length===0){t.classList.add("empty")}else{t.classList.remove("empty")}};n();t.addEventListener("click",function(){e.value="";e.focus();n()});e.addEventListener("keyup",n,false)}n.ready(function(){a=t.getElementById(r);function u(e){if(i){o(a);i=false}else{}}if(a!==null){l(a);if(n.autocompleter){n.autocomplete=AutoComplete.call(e,{Url:"./autocompleter",EmptyMessage:n.noItemFound,HttpMethod:n.method,MinChars:4,Delay:300},"#"+r);e.addEventListener("resize",function(){var e=new CustomEvent("position");a.dispatchEvent(e)})}a.addEventListener("focus",u,false);a.focus()}if(a!==null&&n.search_on_category_select){t.querySelector(".help").className="invisible";n.on("#categories input","change",function(e){var n,i=t.querySelectorAll('#categories input[type="checkbox"]');for(n=0;n<i.length;n++){if(i[n]!==this&&i[n].checked){i[n].click()}}if(!this.checked){this.click()}s();return false});n.on(t.getElementById("time_range"),"change",s);n.on(t.getElementById("language"),"change",s)}})})(window,document,window.searx);
//# sourceMappingURL=searx.min.js.map \ No newline at end of file
diff --git a/searx/static/themes/simple/js/searx.min.js.map b/searx/static/themes/simple/js/searx.min.js.map
index 2a2630202..5528c1e50 100644
--- a/searx/static/themes/simple/js/searx.min.js.map
+++ b/searx/static/themes/simple/js/searx.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["searx.js"],"names":["w","d","searx","callbackSafe","callback","el","e","call","exception","console","log","Element","ElementPrototype","matches","matchesSelector","webkitMatchesSelector","msMatchesSelector","selector","node","this","nodes","parentNode","document","querySelectorAll","i","prototype","on","obj","eventType","useCapture","addEventListener","target","srcElement","found","parentElement","ready","readyState","bind","http","method","url","req","XMLHttpRequest","resolve","reject","promise","then","catch","open","onload","status","response","responseType","Error","statusText","onerror","onabort","send","ex","loadStyle","src","path","staticPath","id","replace","s","getElementById","createElement","setAttribute","body","appendChild","loadScript","hasAttribute","apply","style","display","window","f","exports","module","define","amd","global","self","AutoComplete","t","n","r","o","u","a","require","code","l","length","1","ConditionOperator","EventType","params","Array","isArray","forEach","specificParams","merge","defaults","DOMResults","create","elements","input","element","Input","nodeName","match","getAttribute","_Position","$Listeners","blur","_Blur","destroy","focus","_Focus","keyup","event","KEYUP","keydown","KEYDOWN","position","getEventsByType","type","mappings","key","KeyboardMappings","undefined","Event","name","mapping","Operator","AND","Conditions","condition","OR","Not","hasOwnProperty","Is","keyCode","From","To","Callback","makeRequest","propertyHttpHeaders","Object","getOwnPropertyNames","HttpHeaders","request","_HttpMethod","_Url","queryParams","_Pre","queryParamsStringify","encodeURIComponent","_QueryArg","indexOf","setRequestHeader","onreadystatechange","$Cache","ajax","timeout","$AjaxTimer","clearTimeout","setTimeout","Delay","Request","abort","cache","_Cache","removeEventListener","removeChild","tmp","arguments","EmptyMessage","Highlight","getRegex","value","RegExp","transform","Content-type","Limit","MinChars","HttpMethod","QueryArg","Url","Enter","liActive","querySelector","preventDefault","_Select","KeyUpAndDown_down","KeyUpAndDown_up","first","last","active","children","lisCount","getElementsByTagName","classList","remove","item","add","AlphaNum","oldValue","currentValue","_MinChars","_Render","_Post","_Open","_EmptyMessage","_Limit","limit","isNaN","parseInt","minchars","_Highlight","label","now","li","onclick","onmouseenter","offsetTop","offsetHeight","offsetLeft","clientWidth","ul","_RenderRaw","_RenderResponseItems","hasChildNodes","childNodes","reverse","Math","min","abs","innerHTML","Label","Value","emptyMessage","returnResponse","json","JSON","parse","keys","push","ImageLayout","container_selector","results_selector","img_selector","maxHeight","margin","_alignAllDone","_getHeigth","images","width","img","naturalWidth","naturalHeight","_setSize","height","imgWidth","imagesLength","marginLeft","marginTop","marginRight","marginBottom","_alignImgs","imgGroup","slice","h","containerWidth","align","results_selectorNode","results_length","previous","current","previousElementSibling","watch","throttleAlign","results_nodes","highlightResult","which","noScroll","effectiveWhich","next","results","top","documentElement","scrollTop","bot","clientHeight","etop","nextElementSibling","removeAttribute","link","scrollPageToSelected","pageButtonClick","num","buttons","$","click","sel","wtop","wheight","ebot","scroll","scrollX","scrollPage","amount","scrollBy","scrollPageTo","nav","scrollTo","openResult","newTab","location","href","contains","vimKeys","27","fun","activeElement","des","cat","73","66","innerHeight","70","85","68","71","scrollHeight","86","75","74","80","78","79","84","82","reload","72","helpPanel","toggle","categories","k","sorted","sort","b","html","lastCategory","cj","append","ctrlKey","altKey","shiftKey","metaKey","tagName","toLowerCase","query_start","overpass_url","osm_id","dataset","osmId","osm_type","osmType","result_table","resultTable","result_table_loadicon","resultTableLoadicon","osm_ignore_tags","query","contentType","newHtml","row","tags","substring","leaflet_target","leafletTarget","map_lon","parseFloat","mapLon","map_lat","mapLat","map_zoom","mapZoom","map_boundingbox","mapBoundingbox","map_geojson","mapGeojson","map_bounds","southWest","L","latLng","northEast","latLngBounds","map","osmMapnik","TileLayer","minZoom","maxZoom","attribution","fitBounds","setView","addLayer","baseLayers","OSM Mapnik","control","layers","addTo","geoJson","image_thumbnail_layout","btnLabelCollapsed","btnLabelNotCollapsed","targetElement","iframe_load","srctest","opacity","placeCursorAtEnd","setSelectionRange","len","submitIfQuery","qinput","search","submit","firstFocus","autocompleter","autocomplete","noItemFound","CustomEvent","dispatchEvent","search_on_category_select","className","checked"],"mappings":";;CAiBA,SAAUA,EAAGC,EAAGC,GAEd,aAoBA,SAASC,EAAaC,EAAUC,EAAIC,GAClC,IACEF,EAASG,KAAKF,EAAIC,GAClB,MAAOE,GACPC,QAAQC,IAAIF,IAlBZR,EAAEW,SACJ,SAAUC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,QAOlB,OAJM9R,KAAKma,SACTna,KAAK8R,QAEPyH,KACO,IAGTxa,EAAMwB,GAAGzB,EAAEiE,eAAe,cAAe,SAAUwW,GACnDxa,EAAMwB,GAAGzB,EAAEiE,eAAe,YAAa,SAAUwW,MAxEvD,CA6EG9V,OAAQtD,SAAUsD,OAAO1E","file":"searx.min.js"} \ No newline at end of file
+{"version":3,"sources":["searx.js"],"names":["w","d","searx","Element","ElementPrototype","matches","matchesSelector","webkitMatchesSelector","msMatchesSelector","selector","node","this","nodes","parentNode","document","querySelectorAll","i","prototype","callbackSafe","callback","el","e","call","exception","console","log","on","obj","eventType","useCapture","addEventListener","target","srcElement","found","parentElement","ready","readyState","bind","http","method","url","req","XMLHttpRequest","resolve","reject","promise","then","catch","open","onload","status","response","responseType","Error","statusText","onerror","onabort","send","ex","loadStyle","src","path","staticPath","id","replace","s","getElementById","createElement","setAttribute","body","appendChild","loadScript","hasAttribute","apply","insertBefore","newNode","referenceNode","element","insertAfter","nextSibling","classList","add","window","f","exports","module","define","amd","g","global","self","AutoComplete","t","n","r","o","u","a","require","code","l","length","1","ConditionOperator","EventType","params","Array","isArray","forEach","elements","input","specificParams","merge","defaults","DOMResults","create","Input","nodeName","match","getAttribute","_Position","$Listeners","blur","_Blur","destroy","focus","_Focus","keyup","event","KEYUP","keydown","KEYDOWN","position","getEventsByType","type","mappings","key","KeyboardMappings","Event","undefined","eventIdentifier","condition","mapping","Operator","AND","OR","Not","hasOwnProperty","Is","keyCode","From","To","name","Conditions","Callback","makeRequest","propertyHttpHeaders","Object","getOwnPropertyNames","HttpHeaders","request","_HttpMethod","_Url","queryParams","_Pre","queryParamsStringify","encodeURIComponent","_QueryArg","indexOf","setRequestHeader","onreadystatechange","$Cache","ajax","timeout","$AjaxTimer","clearTimeout","setTimeout","Delay","Request","abort","cache","_Cache","removeEventListener","removeChild","tmp","arguments","EmptyMessage","Highlight","getRegex","value","RegExp","transform","Content-type","Limit","MinChars","HttpMethod","QueryArg","Url","Enter","liActive","querySelector","preventDefault","_Select","KeyUpAndDown_down","KeyUpAndDown_up","first","last","active","currentIndex","children","lisCount","getElementsByTagName","remove","item","AlphaNum","oldValue","currentValue","_MinChars","_Render","_Post","_Open","_EmptyMessage","emptyMessage","_Limit","limit","isNaN","parseInt","minchars","_Highlight","label","now","li","onclick","onmouseenter","offsetTop","offsetHeight","offsetLeft","clientWidth","ul","_RenderRaw","_RenderResponseItems","hasChildNodes","childNodes","reverse","Math","min","abs","innerHTML","Label","Value","returnResponse","json","JSON","parse","keys","push","ImageLayout","container_selector","results_selector","img_selector","maxHeight","margin","_alignAllDone","_getHeigth","images","width","img","naturalWidth","naturalHeight","_setSize","height","imgWidth","imagesLength","style","marginLeft","marginTop","marginRight","marginBottom","_alignImgs","imgGroup","slice","h","containerWidth","align","results_selectorNode","results_length","previous","current","previousElementSibling","watch","imgNodeLength","results_nodes","throttleAlign","highlightResult","contains","vimKeys","27","fun","removeFocus","des","cat","73","searchInputFocus","66","scrollPage","innerHeight","70","85","68","71","scrollPageTo","scrollHeight","86","75","74","80","pageButtonClick","78","79","openResult","84","82","reloadPage","72","toggleHelp","ctrlKey","altKey","shiftKey","metaKey","tagName","toLowerCase","which","noScroll","effectiveWhich","next","results","top","documentElement","scrollTop","bot","clientHeight","etop","ebot","nextElementSibling","removeAttribute","link","scrollPageToSelected","location","reload","activeElement","num","buttons","$","click","sel","wtop","wheight","offset","scroll","scrollX","wbot","amount","scrollBy","nav","scrollTo","newTab","href","initHelpContent","divElement","categories","k","sorted","sort","b","html","lastCategory","cj","helpPanel","className","toggle","overpass_url","query_start","query_end","osm_id","dataset","osmId","osm_type","osmType","result_table","resultTable","result_table_loadicon","resultTableLoadicon","osm_ignore_tags","query","contentType","newHtml","row","tags","substring","leaflet_target","leafletTarget","map_lon","parseFloat","mapLon","map_lat","mapLat","map_zoom","mapZoom","map_boundingbox","mapBoundingbox","map_geojson","mapGeojson","map_bounds","southWest","L","latLng","northEast","latLngBounds","map","osmMapnikUrl","osmMapnikAttrib","osmMapnik","TileLayer","minZoom","maxZoom","attribution","osmWikimediaUrl","osmWikimediaAttrib","osmWikimedia","fitBounds","setView","addLayer","baseLayers","OSM Mapnik","control","layers","addTo","geoJson","image_thumbnail_layout","btnLabelCollapsed","btnLabelNotCollapsed","targetElement","iframe_load","srctest","opacity","firstFocus","qinput_id","qinput","placeCursorAtEnd","setSelectionRange","len","submitIfQuery","search","submit","createClearButton","cs","updateClearButton","placeCursorAtEndOnce","autocompleter","autocomplete","noItemFound","CustomEvent","dispatchEvent","search_on_category_select","checked"],"mappings":";;CAiBA,SAAUA,EAAGC,EAAGC,GAEd,aAMA,GAAIF,EAAEG,QAAS,EACb,SAAUC,GACRA,EAAiBC,QAAUD,EAAiBC,SAC5CD,EAAiBE,iBACjBF,EAAiBG,uBACjBH,EAAiBI,mBACjB,SAASC,GACP,IAAIC,EAAOC,KAAMC,GAASF,EAAKG,YAAcH,EAAKI,UAAUC,iBAAiBN,GAAWO,GAAK,EAC7F,MAAOJ,IAAQI,IAAMJ,EAAMI,IAAMN,GACjC,QAASE,EAAMI,KARnB,CAUGb,QAAQc,WAGb,SAASC,EAAaC,EAAUC,EAAIC,GAClC,IACEF,EAASG,KAAKF,EAAIC,GAClB,MAAOE,GACPC,QAAQC,IAAIF,IAIhBrB,EAAQA,MAERA,EAAMwB,GAAK,SAASC,EAAKC,EAAWT,EAAUU,GAC5CA,EAAaA,GAAc,MAC3B,UAAWF,IAAQ,SAAU,CAE3BA,EAAIG,iBAAiBF,EAAWT,EAAUU,OACrC,CAEL5B,EAAE6B,iBAAiBF,EAAW,SAASP,GACrC,IAAID,EAAKC,EAAEU,QAAUV,EAAEW,WAAYC,EAAQ,MAC3C,MAAOb,GAAMA,EAAGf,SAAWe,IAAOnB,KAAOgC,EAAQb,EAAGf,QAAQsB,IAAOP,EAAKA,EAAGc,cAC3E,GAAID,EAAOf,EAAaC,EAAUC,EAAIC,IACrCQ,KAIP3B,EAAMiC,MAAQ,SAAShB,GACrB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AiB,QAAS0a,EAAmB,OAGtDtc,EAAMiC,MAAM,WACV4Z,EAAS9b,EAAEiE,eAAe4X,GAE1B,SAASW,EAAqBpb,GAC5B,GAAIwa,EAAY,CACdG,EAAiBD,GACjBF,EAAa,UACR,GAKT,GAAIE,IAAW,KAAM,CAEnBO,EAAkBP,GAGlB,GAAI7b,EAAMwc,cAAe,CACvBxc,EAAMyc,aAAehX,aAAarE,KAAKtB,GACrCqM,IAAK,kBACLX,aAAcxL,EAAM0c,YACpBzQ,WAAYjM,EAAMqC,OAClB2J,SAAU,EACVjB,MAAO,KACN,IAAM6Q,GAGT9b,EAAE8B,iBAAiB,SAAU,WAC3B,IAAIkG,EAAQ,IAAI6U,YAAY,YAC5Bd,EAAOe,cAAc9U,KAIzB+T,EAAOja,iBAAiB,QAAS2a,EAAsB,OACvDV,EAAOlU,QAIT,GAAIkU,IAAW,MAAQ7b,EAAM6c,0BAA2B,CACtD9c,EAAEuM,cAAc,SAASkL,UAAU,YAEnCxX,EAAMwB,GAAG,oBAAqB,SAAU,SAASL,GAC/C,IAAIL,EAAGiW,EAAahX,EAAEc,iBAAiB,sCACvC,IAAIC,EAAE,EAAGA,EAAEiW,EAAW5Q,OAAQrF,IAAK,CACjC,GAAIiW,EAAWjW,KAAOL,MAAQsW,EAAWjW,GAAGgc,QAAS,CACnD/F,EAAWjW,GAAGiV,SAGlB,IAAMtV,KAAKqc,QAAS,CAClBrc,KAAKsV,QAEPkG,IACA,OAAO,QAGTjc,EAAMwB,GAAGzB,EAAEiE,eAAe,cAAe,SAAUiY,GACnDjc,EAAMwB,GAAGzB,EAAEiE,eAAe,YAAa,SAAUiY,OA/FvD,CAoGGjX,OAAQpE,SAAUoE,OAAOhF","file":"searx.min.js"} \ No newline at end of file
diff --git a/searx/static/themes/simple/js/searx_src/00_searx_toolkit.js b/searx/static/themes/simple/js/searx_src/00_searx_toolkit.js
index fca7e1669..fb524427d 100644
--- a/searx/static/themes/simple/js/searx_src/00_searx_toolkit.js
+++ b/searx/static/themes/simple/js/searx_src/00_searx_toolkit.js
@@ -147,9 +147,18 @@
}
};
+ searx.insertBefore = function (newNode, referenceNode) {
+ element.parentNode.insertBefore(newNode, referenceNode);
+ };
+
+ searx.insertAfter = function(newNode, referenceNode) {
+ referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
+ };
+
searx.on('.close', 'click', function(e) {
var el = e.target || e.srcElement;
- this.parentNode.style.display="None";
+ this.parentNode.classList.add('invisible');
});
+
return searx;
})(window, document, window.searx);
diff --git a/searx/static/themes/simple/js/searx_src/searx_keyboard.js b/searx/static/themes/simple/js/searx_src/searx_keyboard.js
index 6365b5243..657d9ec93 100644
--- a/searx/static/themes/simple/js/searx_src/searx_keyboard.js
+++ b/searx/static/themes/simple/js/searx_src/searx_keyboard.js
@@ -116,7 +116,7 @@ searx.ready(function() {
}
};
- searx.on(document, "keyup", function(e) {
+ searx.on(document, "keydown", function(e) {
// check for modifiers so we don't break browser's hotkeys
if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
var tagName = e.target.tagName.toLowerCase();
@@ -126,6 +126,7 @@ searx.ready(function() {
}
} else {
if (e.target === document.body || tagName === 'a' || tagName === 'button') {
+ e.preventDefault();
vimKeys[e.keyCode].fun();
}
}
@@ -290,13 +291,7 @@ searx.ready(function() {
};
}
- function toggleHelp() {
- var helpPanel = document.querySelector('#vim-hotkeys-help');
- if (helpPanel.length) {
- helpPanel.classList.toggle('hidden');
- return;
- }
-
+ function initHelpContent(divElement) {
var categories = {};
for (var k in vimKeys) {
@@ -313,14 +308,9 @@ searx.ready(function() {
return;
}
- var html = '<div id="vim-hotkeys-help" class="well vim-hotkeys-help">';
- html += '<div class="container-fluid">';
-
- html += '<div class="row">';
- html += '<div class="col-sm-12">';
- html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
- html += '</div>'; // col-sm-12
- html += '</div>'; // row
+ var html = '<a href="#" class="close" aria-label="close" title="close">×</a>';
+ html += '<h3>How to navigate searx with Vim-like hotkeys</h3>';
+ html += '<table>';
for (var i = 0; i < sorted.length; i++) {
var cat = categories[sorted[i]];
@@ -329,13 +319,11 @@ searx.ready(function() {
var first = i % 2 === 0;
if (first) {
- html += '<div class="row dflex">';
+ html += '<tr>';
}
- html += '<div class="col-sm-' + (first && lastCategory ? 12 : 6) + ' dflex">';
+ html += '<td>';
- html += '<div class="panel panel-default iflex">';
- html += '<div class="panel-heading">' + cat[0].cat + '</div>';
- html += '<div class="panel-body">';
+ html += '<h4>' + cat[0].cat + '</h4>';
html += '<ul class="list-unstyled">';
for (var cj in cat) {
@@ -343,18 +331,36 @@ searx.ready(function() {
}
html += '</ul>';
- html += '</div>'; // panel-body
- html += '</div>'; // panel
- html += '</div>'; // col-sm-*
+ html += '</td>'; // col-sm-*
if (!first || lastCategory) {
- html += '</div>'; // row
+ html += '</tr>'; // row
}
}
- html += '</div>'; // container-fluid
- html += '</div>'; // vim-hotkeys-help
+ html += '</table>';
+
+ divElement.innerHTML = html;
+ }
+
+ function toggleHelp() {
+ var helpPanel = document.querySelector('#vim-hotkeys-help');
+ console.log(helpPanel);
+ if (helpPanel === undefined || helpPanel === null) {
+ // first call
+ helpPanel = document.createElement('div');
+ helpPanel.id = 'vim-hotkeys-help';
+ helpPanel.className='dialog-modal';
+ helpPanel.style='width: 40%';
+ initHelpContent(helpPanel);
+ var body = document.getElementsByTagName('body')[0];
+ body.appendChild(helpPanel);
+ } else {
+ // togggle hidden
+ helpPanel.classList.toggle('invisible');
+ return;
+ }
- $('body').append(html);
}
+
});
diff --git a/searx/static/themes/simple/js/searx_src/searx_mapresult.js b/searx/static/themes/simple/js/searx_src/searx_mapresult.js
index 823f64815..869d07da0 100644
--- a/searx/static/themes/simple/js/searx_src/searx_mapresult.js
+++ b/searx/static/themes/simple/js/searx_src/searx_mapresult.js
@@ -90,13 +90,14 @@
newHtml += "</td></tr>";
}
}
- result_table_loadicon.classList.add('invisible');
+ result_table_loadicon.parentNode.removeChild(result_table_loadicon);
result_table.classList.remove('invisible');
result_table.querySelector("tbody").innerHTML = newHtml;
}
})
.catch(function() {
- result_table_loadicon.innerHTML = result_table_loadicon.innerHTML + "<p class=\"text-muted\">could not load data!</p>";
+ result_table_loadicon.classList.remove('invisible');
+ result_table_loadicon.innerHTML = "could not load data!";
});
}
}
diff --git a/searx/static/themes/simple/js/searx_src/searx_search.js b/searx/static/themes/simple/js/searx_src/searx_search.js
index 1b93f9039..964be2194 100644
--- a/searx/static/themes/simple/js/searx_src/searx_search.js
+++ b/searx/static/themes/simple/js/searx_src/searx_search.js
@@ -33,6 +33,26 @@
}
}
+ function createClearButton(qinput) {
+ var cs = document.getElementById('clear_search');
+ var updateClearButton = function() {
+ if (qinput.value.length === 0) {
+ cs.classList.add("empty");
+ } else {
+ cs.classList.remove("empty");
+ }
+ };
+
+ // update status, event listener
+ updateClearButton();
+ cs.addEventListener('click', function() {
+ qinput.value='';
+ qinput.focus();
+ updateClearButton();
+ });
+ qinput.addEventListener('keyup', updateClearButton, false);
+ }
+
searx.ready(function() {
qinput = d.getElementById(qinput_id);
@@ -46,6 +66,9 @@
}
if (qinput !== null) {
+ // clear button
+ createClearButton(qinput);
+
// autocompleter
if (searx.autocompleter) {
searx.autocomplete = AutoComplete.call(w, {