summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2020-06-16 05:56:12 +0000
committerGitHub <noreply@github.com>2020-06-16 05:56:12 +0000
commitdda4a46f8ede4d4f035143cac864769873ad0236 (patch)
tree707ef88f3a3289ba37191c2bac683ae64674613e /searx
parente2770b587186d8ab4e4c7b44ba83f2014edffa09 (diff)
parent0dc5bdb6ef602d00456eb1db96d45e2f42b2b7a4 (diff)
downloadsearxng-dda4a46f8ede4d4f035143cac864769873ad0236.tar.gz
searxng-dda4a46f8ede4d4f035143cac864769873ad0236.zip
Merge branch 'master' into filtron
Diffstat (limited to 'searx')
-rw-r--r--searx/engines/flickr_noapi.py12
-rw-r--r--searx/static/themes/oscar/js/searx.js2
-rw-r--r--searx/static/themes/oscar/js/searx.min.js4
-rw-r--r--searx/static/themes/oscar/js/searx_src/leaflet_map.js2
-rw-r--r--searx/static/themes/simple/js/searx.head.min.js2
-rw-r--r--searx/static/themes/simple/js/searx.js2
-rw-r--r--searx/static/themes/simple/js/searx.min.js4
-rw-r--r--searx/static/themes/simple/js/searx.min.js.map2
-rw-r--r--searx/static/themes/simple/js/searx_src/searx_mapresult.js2
-rw-r--r--searx/templates/__common__/translations.js.tpl1
-rw-r--r--searx/templates/oscar/base.html2
-rw-r--r--searx/templates/simple/base.html1
-rwxr-xr-xsearx/webapp.py8
13 files changed, 25 insertions, 19 deletions
diff --git a/searx/engines/flickr_noapi.py b/searx/engines/flickr_noapi.py
index c8ee34f7a..1cbb3e0a9 100644
--- a/searx/engines/flickr_noapi.py
+++ b/searx/engines/flickr_noapi.py
@@ -117,14 +117,10 @@ def response(resp):
'img_format': img_format,
'template': 'images.html'
}
- try:
- result['author'] = author
- result['title'] = title
- result['content'] = content
- except:
- result['author'] = ''
- result['title'] = ''
- result['content'] = ''
+ result['author'] = author.encode('utf-8', 'ignore').decode('utf-8')
+ result['source'] = source.encode('utf-8', 'ignore').decode('utf-8')
+ result['title'] = title.encode('utf-8', 'ignore').decode('utf-8')
+ result['content'] = content.encode('utf-8', 'ignore').decode('utf-8')
results.append(result)
return results
diff --git a/searx/static/themes/oscar/js/searx.js b/searx/static/themes/oscar/js/searx.js
index c93f597fe..2cd9ca26a 100644
--- a/searx/static/themes/oscar/js/searx.js
+++ b/searx/static/themes/oscar/js/searx.js
@@ -291,7 +291,7 @@ $(document).ready(function(){
}
})
.fail(function() {
- $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">could not load data!</p>");
+ $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">"+could_not_load+"</p>");
});
}
}
diff --git a/searx/static/themes/oscar/js/searx.min.js b/searx/static/themes/oscar/js/searx.min.js
index 08aba2b4b..52a58800b 100644
--- a/searx/static/themes/oscar/js/searx.min.js
+++ b/searx/static/themes/oscar/js/searx.min.js
@@ -1,2 +1,2 @@
-/*! oscar/searx.min.js | 03-06-2020 | */
-requirejs.config({baseUrl:"./static/themes/oscar/js",paths:{app:"../app"}}),window.searx=function(a){"use strict";var b=a.currentScript||function(){var b=a.getElementsByTagName("script");return b[b.length-1]}();return{autocompleter:"true"===b.getAttribute("data-autocompleter"),method:b.getAttribute("data-method")}}(document),searx.autocompleter&&(searx.searchResults=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:"./autocompleter?q=%QUERY"}),searx.searchResults.initialize()),$(document).ready(function(){var a="";searx.autocompleter&&($("#q").on("keydown",function(b){13==b.which&&(a=$("#q").val())}),$("#q").typeahead(null,{name:"search-results",displayKey:function(a){return a},source:searx.searchResults.ttAdapter()}),$("#q").bind("typeahead:selected",function(b,c){a&&$("#q").val(a),$("#search_form").submit()}))}),$(document).ready(function(){$("#q.autofocus").focus(),$(".select-all-on-click").click(function(){$(this).select()}),$(".btn-collapse").click(function(){var a=$(this).data("btn-text-collapsed"),b=$(this).data("btn-text-not-collapsed");""!==a&&""!==b&&($(this).hasClass("collapsed")?new_html=$(this).html().replace(a,b):new_html=$(this).html().replace(b,a),$(this).html(new_html))}),$(".btn-toggle .btn").click(function(){var a="btn-"+$(this).data("btn-class"),b=$(this).data("btn-label-default"),c=$(this).data("btn-label-toggled");""!==c&&($(this).hasClass("btn-default")?new_html=$(this).html().replace(b,c):new_html=$(this).html().replace(c,b),$(this).html(new_html)),$(this).toggleClass(a),$(this).toggleClass("btn-default")}),$(".media-loader").click(function(){var a=$(this).data("target"),b=$(a+" > iframe"),c=b.attr("src");void 0!==c&&!1!==c||b.attr("src",b.data("src"))}),$(".btn-sm").dblclick(function(){var a="btn-"+$(this).data("btn-class");$(this).hasClass("btn-default")?($(".btn-sm > input").attr("checked","checked"),$(".btn-sm > input").prop("checked",!0),$(".btn-sm").addClass(a),$(".btn-sm").addClass("active"),$(".btn-sm").removeClass("btn-default")):($(".btn-sm > input").attr("checked",""),$(".btn-sm > input").removeAttr("checked"),$(".btn-sm > input").checked=!1,$(".btn-sm").removeClass(a),$(".btn-sm").removeClass("active"),$(".btn-sm").addClass("btn-default"))})}),$(document).ready(function(){$(".searx_overpass_request").on("click",function(a){var b="https://overpass-api.de/api/interpreter?data=",c=b+"[out:json][timeout:25];(",d=");out meta;",e=$(this).data("osm-id"),f=$(this).data("osm-type"),g=$(this).data("result-table"),h="#"+$(this).data("result-table-loadicon"),i=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(e&&f&&g){g="#"+g;var j=null;switch(f){case"node":j=c+"node("+e+");"+d;break;case"way":j=c+"way("+e+");"+d;break;case"relation":j=c+"relation("+e+");"+d}if(j){$.ajax(j).done(function(a){if(a&&a.elements&&a.elements[0]){var b=a.elements[0],c=$(g).html();for(var d in b.tags)if(null===b.tags.name||-1==i.indexOf(d)){switch(c+="<tr><td>"+d+"</td><td>",d){case"phone":case"fax":c+='<a href="tel:'+b.tags[d].replace(/ /g,"")+'">'+b.tags[d]+"</a>";break;case"email":c+='<a href="mailto:'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"website":case"url":c+='<a href="'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikidata":c+='<a href="https://www.wikidata.org/wiki/'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikipedia":if(-1!=b.tags[d].indexOf(":")){c+='<a href="https://'+b.tags[d].substring(0,b.tags[d].indexOf(":"))+".wikipedia.org/wiki/"+b.tags[d].substring(b.tags[d].indexOf(":")+1)+'">'+b.tags[d]+"</a>";break}default:c+=b.tags[d]}c+="</td></tr>"}$(g).html(c),$(g).removeClass("hidden"),$(h).addClass("hidden")}}).fail(function(){$(h).html($(h).html()+'<p class="text-muted">could not load data!</p>')})}}$(this).off(a)}),$(".searx_init_map").on("click",function(a){var b=$(this).data("leaflet-target"),c=$(this).data("map-lon"),d=$(this).data("map-lat"),e=$(this).data("map-zoom"),f=$(this).data("map-boundingbox"),g=$(this).data("map-geojson");require(["leaflet-0.7.3.min"],function(a){f&&(southWest=L.latLng(f[0],f[2]),northEast=L.latLng(f[1],f[3]),map_bounds=L.latLngBounds(southWest,northEast)),L.Icon.Default.imagePath="./static/themes/oscar/img/map";var h=L.map(b),i="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",j='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',k=new L.TileLayer(i,{minZoom:1,maxZoom:19,attribution:j}),l="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",m='Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';new L.TileLayer(l,{minZoom:1,maxZoom:19,attribution:m});map_bounds?setTimeout(function(){h.fitBounds(map_bounds,{maxZoom:17})},0):c&&d&&(e?h.setView(new L.LatLng(d,c),e):h.setView(new L.LatLng(d,c),8)),h.addLayer(k);var n={"OSM Mapnik":k};L.control.layers(n).addTo(h),g&&L.geoJson(g).addTo(h)}),$(this).off(a)})}),$(document).ready(function(){$("#allow-all-engines").click(function(){$(".onoffswitch-checkbox").each(function(){this.checked=!1})}),$("#disable-all-engines").click(function(){$(".onoffswitch-checkbox").each(function(){this.checked=!0})})}); \ No newline at end of file
+/*! oscar/searx.min.js | 15-06-2020 | */
+requirejs.config({baseUrl:"./static/themes/oscar/js",paths:{app:"../app"}}),window.searx=function(a){"use strict";var b=a.currentScript||function(){var b=a.getElementsByTagName("script");return b[b.length-1]}();return{autocompleter:"true"===b.getAttribute("data-autocompleter"),method:b.getAttribute("data-method")}}(document),searx.autocompleter&&(searx.searchResults=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:"./autocompleter?q=%QUERY"}),searx.searchResults.initialize()),$(document).ready(function(){var a="";searx.autocompleter&&($("#q").on("keydown",function(b){13==b.which&&(a=$("#q").val())}),$("#q").typeahead(null,{name:"search-results",displayKey:function(a){return a},source:searx.searchResults.ttAdapter()}),$("#q").bind("typeahead:selected",function(b,c){a&&$("#q").val(a),$("#search_form").submit()}))}),$(document).ready(function(){$("#q.autofocus").focus(),$(".select-all-on-click").click(function(){$(this).select()}),$(".btn-collapse").click(function(){var a=$(this).data("btn-text-collapsed"),b=$(this).data("btn-text-not-collapsed");""!==a&&""!==b&&($(this).hasClass("collapsed")?new_html=$(this).html().replace(a,b):new_html=$(this).html().replace(b,a),$(this).html(new_html))}),$(".btn-toggle .btn").click(function(){var a="btn-"+$(this).data("btn-class"),b=$(this).data("btn-label-default"),c=$(this).data("btn-label-toggled");""!==c&&($(this).hasClass("btn-default")?new_html=$(this).html().replace(b,c):new_html=$(this).html().replace(c,b),$(this).html(new_html)),$(this).toggleClass(a),$(this).toggleClass("btn-default")}),$(".media-loader").click(function(){var a=$(this).data("target"),b=$(a+" > iframe"),c=b.attr("src");void 0!==c&&!1!==c||b.attr("src",b.data("src"))}),$(".btn-sm").dblclick(function(){var a="btn-"+$(this).data("btn-class");$(this).hasClass("btn-default")?($(".btn-sm > input").attr("checked","checked"),$(".btn-sm > input").prop("checked",!0),$(".btn-sm").addClass(a),$(".btn-sm").addClass("active"),$(".btn-sm").removeClass("btn-default")):($(".btn-sm > input").attr("checked",""),$(".btn-sm > input").removeAttr("checked"),$(".btn-sm > input").checked=!1,$(".btn-sm").removeClass(a),$(".btn-sm").removeClass("active"),$(".btn-sm").addClass("btn-default"))})}),$(document).ready(function(){$(".searx_overpass_request").on("click",function(a){var b="https://overpass-api.de/api/interpreter?data=",c=b+"[out:json][timeout:25];(",d=");out meta;",e=$(this).data("osm-id"),f=$(this).data("osm-type"),g=$(this).data("result-table"),h="#"+$(this).data("result-table-loadicon"),i=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(e&&f&&g){g="#"+g;var j=null;switch(f){case"node":j=c+"node("+e+");"+d;break;case"way":j=c+"way("+e+");"+d;break;case"relation":j=c+"relation("+e+");"+d}if(j){$.ajax(j).done(function(a){if(a&&a.elements&&a.elements[0]){var b=a.elements[0],c=$(g).html();for(var d in b.tags)if(null===b.tags.name||-1==i.indexOf(d)){switch(c+="<tr><td>"+d+"</td><td>",d){case"phone":case"fax":c+='<a href="tel:'+b.tags[d].replace(/ /g,"")+'">'+b.tags[d]+"</a>";break;case"email":c+='<a href="mailto:'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"website":case"url":c+='<a href="'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikidata":c+='<a href="https://www.wikidata.org/wiki/'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikipedia":if(-1!=b.tags[d].indexOf(":")){c+='<a href="https://'+b.tags[d].substring(0,b.tags[d].indexOf(":"))+".wikipedia.org/wiki/"+b.tags[d].substring(b.tags[d].indexOf(":")+1)+'">'+b.tags[d]+"</a>";break}default:c+=b.tags[d]}c+="</td></tr>"}$(g).html(c),$(g).removeClass("hidden"),$(h).addClass("hidden")}}).fail(function(){$(h).html($(h).html()+'<p class="text-muted">'+could_not_load+"</p>")})}}$(this).off(a)}),$(".searx_init_map").on("click",function(a){var b=$(this).data("leaflet-target"),c=$(this).data("map-lon"),d=$(this).data("map-lat"),e=$(this).data("map-zoom"),f=$(this).data("map-boundingbox"),g=$(this).data("map-geojson");require(["leaflet-0.7.3.min"],function(a){f&&(southWest=L.latLng(f[0],f[2]),northEast=L.latLng(f[1],f[3]),map_bounds=L.latLngBounds(southWest,northEast)),L.Icon.Default.imagePath="./static/themes/oscar/img/map";var h=L.map(b),i="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",j='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',k=new L.TileLayer(i,{minZoom:1,maxZoom:19,attribution:j}),l="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",m='Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';new L.TileLayer(l,{minZoom:1,maxZoom:19,attribution:m});map_bounds?setTimeout(function(){h.fitBounds(map_bounds,{maxZoom:17})},0):c&&d&&(e?h.setView(new L.LatLng(d,c),e):h.setView(new L.LatLng(d,c),8)),h.addLayer(k);var n={"OSM Mapnik":k};L.control.layers(n).addTo(h),g&&L.geoJson(g).addTo(h)}),$(this).off(a)})}),$(document).ready(function(){$("#allow-all-engines").click(function(){$(".onoffswitch-checkbox").each(function(){this.checked=!1})}),$("#disable-all-engines").click(function(){$(".onoffswitch-checkbox").each(function(){this.checked=!0})})}); \ No newline at end of file
diff --git a/searx/static/themes/oscar/js/searx_src/leaflet_map.js b/searx/static/themes/oscar/js/searx_src/leaflet_map.js
index 3c8c616b1..06931b474 100644
--- a/searx/static/themes/oscar/js/searx_src/leaflet_map.js
+++ b/searx/static/themes/oscar/js/searx_src/leaflet_map.js
@@ -90,7 +90,7 @@ $(document).ready(function(){
}
})
.fail(function() {
- $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">could not load data!</p>");
+ $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">"+could_not_load+"</p>");
});
}
}
diff --git a/searx/static/themes/simple/js/searx.head.min.js b/searx/static/themes/simple/js/searx.head.min.js
index 00c711c79..8cd0df3d6 100644
--- a/searx/static/themes/simple/js/searx.head.min.js
+++ b/searx/static/themes/simple/js/searx.head.min.js
@@ -1,4 +1,4 @@
-/*! simple/searx.min.js | 06-08-2019 | https://github.com/asciimoo/searx */
+/*! simple/searx.min.js | 15-06-2020 | */
(function(t,e){"use strict";var a=e.currentScript||function(){var t=e.getElementsByTagName("script");return t[t.length-1]}();t.searx={touch:"ontouchstart"in t||t.DocumentTouch&&document instanceof DocumentTouch||false,method:a.getAttribute("data-method"),autocompleter:a.getAttribute("data-autocompleter")==="true",search_on_category_select:a.getAttribute("data-search-on-category-select")==="true",infinite_scroll:a.getAttribute("data-infinite-scroll")==="true",static_path:a.getAttribute("data-static-path"),no_item_found:a.getAttribute("data-no-item-found")};e.getElementsByTagName("html")[0].className=t.searx.touch?"js touch":"js"})(window,document);
//# sourceMappingURL=searx.head.min.js.map \ No newline at end of file
diff --git a/searx/static/themes/simple/js/searx.js b/searx/static/themes/simple/js/searx.js
index e191f2487..3e9ad3e7f 100644
--- a/searx/static/themes/simple/js/searx.js
+++ b/searx/static/themes/simple/js/searx.js
@@ -1314,7 +1314,7 @@ module.exports = AutoComplete;
})
.catch(function() {
result_table_loadicon.classList.remove('invisible');
- result_table_loadicon.innerHTML = "could not load data!";
+ result_table_loadicon.innerHTML = could_not_load;
});
}
}
diff --git a/searx/static/themes/simple/js/searx.min.js b/searx/static/themes/simple/js/searx.min.js
index 42e8a845c..264a7fb42 100644
--- a/searx/static/themes/simple/js/searx.min.js
+++ b/searx/static/themes/simple/js/searx.min.js
@@ -1,4 +1,4 @@
-/*! simple/searx.min.js | 06-08-2019 | https://github.com/asciimoo/searx */
+/*! simple/searx.min.js | 15-06-2020 | */
window.searx=function(t,a){"use strict";if(t.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 o(e,t,n){try{e.call(t,n)}catch(e){console.log(e)}}var s=window.searx||{};s.on=function(i,e,r,t){t=t||false;if(typeof i!=="string"){i.addEventListener(e,r,t)}else{a.addEventListener(e,function(e){var t=e.target||e.srcElement,n=false;while(t&&t.matches&&t!==a&&!(n=t.matches(i)))t=t.parentElement;if(n)o(r,t,e)},t)}};s.ready=function(e){if(document.readyState!="loading"){e.call(t)}else{t.addEventListener("DOMContentLoaded",e.bind(t))}};s.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};s.loadStyle=function(e){var t=s.static_path+e,n="style_"+e.replace(".","_"),i=a.getElementById(n);if(i===null){i=a.createElement("link");i.setAttribute("id",n);i.setAttribute("rel","stylesheet");i.setAttribute("type","text/css");i.setAttribute("href",t);a.body.appendChild(i)}};s.loadScript=function(e,t){var n=s.static_path+e,i="script_"+e.replace(".","_"),r=a.getElementById(i);if(r===null){r=a.createElement("script");r.setAttribute("id",i);r.setAttribute("src",n);r.onload=t;r.onerror=function(){r.setAttribute("error","1")};a.body.appendChild(r)}else if(!r.hasAttribute("error")){try{t.apply(r,[])}catch(e){console.log(e)}}else{console.log("callback not executed : script '"+n+"' not loaded.")}};s.insertBefore=function(e,t){element.parentNode.insertBefore(e,t)};s.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)};s.on(".close","click",function(e){var t=e.target||e.srcElement;this.parentNode.classList.add("invisible")});return s}(window,document);(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 a(o,s,l){function u(n,e){if(!s[n]){if(!o[n]){var t=typeof require=="function"&&require;if(!e&&t)return t(n,!0);if(c)return c(n,!0);var i=new Error("Cannot find module '"+n+"'");throw i.code="MODULE_NOT_FOUND",i}var r=s[n]={exports:{}};o[n][0].call(r.exports,function(e){var t=o[n][1][e];return u(t?t:e)},r,r.exports,a,o,s,l)}return s[n].exports}var c=typeof require=="function"&&require;for(var e=0;e<l.length;e++)u(l[e]);return u}({1:[function(e,t,n){
/*
@@ -21,5 +21,5 @@ window.searx=function(t,a){"use strict";if(t.Element){(function(e){e.matches=e.m
* @license Free to use under the MIT License.
*
*/
-(function(u,c){"use strict";function e(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}e.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};e.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"}};e.prototype._alignImgs=function(e){var t,n,i=c.querySelector(this.container_selector).clientWidth;e:while(e.length>0){for(var r=1;r<=e.length;r++){t=e.slice(0,r);n=this._getHeigth(t,i);if(n<this.maxHeight){this._setSize(t,n);e=e.slice(r);continue e}}this._setSize(t,Math.min(this.maxHeight,n));break}};e.prototype.align=function(e){var t=c.querySelectorAll(this.results_selector),n=t.length,i=null,r=null,a=[];for(var o=0;o<n;o++){r=t[o];if(r.previousElementSibling!==i&&a.length>0){this._alignImgs(a);a=[]}a.push(r.querySelector(this.img_selector));i=r}if(a.length>0){this._alignImgs(a)}};e.prototype.watch=function(){var e,t,n,i,r=this,a=c.querySelectorAll(this.results_selector),o=a.length;function s(e){r.align()}function l(e){if(r._alignAllDone){r._alignAllDone=false;setTimeout(function(){r.align();r._alignAllDone=true},100)}}u.addEventListener("resize",l);u.addEventListener("pageshow",s);for(e=0;e<o;e++){t=a[e].querySelector(this.img_selector);if(typeof t!=="undefined"){t.addEventListener("load",l);t.addEventListener("error",l)}}};u.searx.ImageLayout=e})(window,document);searx.ready(function(){searx.on(".result","click",function(){n(this)(true)});searx.on(".result a","focus",function(e){var t=e.target;while(t!==undefined){if(t.classList.contains("result")){if(t.getAttribute("data-vim-selected")===null){n(t)(true)}break}t=t.parentNode}},true);var d={27:{key:"Escape",fun:t,des:"remove focus from the focused input",cat:"Control"},73:{key:"i",fun:o,des:"focus on the search input",cat:"Control"},66:{key:"b",fun:r(-window.innerHeight),des:"scroll one page up",cat:"Navigation"},70:{key:"f",fun:r(window.innerHeight),des:"scroll one page down",cat:"Navigation"},85:{key:"u",fun:r(-window.innerHeight/2),des:"scroll half a page up",cat:"Navigation"},68:{key:"d",fun:r(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:n("up"),des:"select previous search result",cat:"Results"},74:{key:"j",fun:n("down"),des:"select next search result",cat:"Results"},80:{key:"p",fun:i(0),des:"go to previous page",cat:"Results"},78:{key:"n",fun:i(1),des:"go to next page",cat:"Results"},79:{key:"o",fun:s(false),des:"open search result",cat:"Results"},84:{key:"t",fun:s(true),des:"open the result in a new tab",cat:"Results"},82:{key:"r",fun:e,des:"reload page from the server",cat:"Control"},72:{key:"h",fun:u,des:"toggle help window",cat:"Other"}};searx.on(document,"keydown",function(e){if(d.hasOwnProperty(e.keyCode)&&!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var t=e.target.tagName.toLowerCase();if(e.keyCode===27){if(t==="input"||t==="select"||t==="textarea"){d[e.keyCode].fun()}}else{if(e.target===document.body||t==="a"||t==="button"){e.preventDefault();d[e.keyCode].fun()}}}});function n(d){return function(e){var t=document.querySelector(".result[data-vim-selected]"),n=d;if(t===null){t=document.querySelector(".result");if(t===null){return}if(d==="down"||d==="up"){n=t}}var i,r=document.querySelectorAll(".result");if(typeof n!=="string"){i=n}else{switch(n){case"visible":var a=document.documentElement.scrollTop||document.body.scrollTop;var o=a+document.documentElement.clientHeight;for(var s=0;s<r.length;s++){i=r[s];var l=i.offsetTop;var u=l+i.clientHeight;if(u<=o&&l>a){break}}break;case"down":i=t.nextElementSibling;if(i===null){i=r[0]}break;case"up":i=t.previousElementSibling;if(i===null){i=r[r.length-1]}break;case"bottom":i=r[r.length-1];break;case"top":default:i=r[0]}}if(i){t.removeAttribute("data-vim-selected");i.setAttribute("data-vim-selected","true");var c=i.querySelector("h3 a")||i.querySelector("a");if(c!==null){c.focus()}if(!e){f()}}}}function e(){document.location.reload(true)}function t(){if(document.activeElement){document.activeElement.blur()}}function i(t){return function(){var e=$('div#pagination button[type="submit"]');if(e.length!==2){console.log("page navigation with this theme is not supported");return}if(t>=0&&t<e.length){e[t].click()}else{console.log("pageButtonClick(): invalid argument")}}}function f(){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 r(e){return function(){window.scrollBy(0,e);n("visible")()}}function a(e,t){return function(){window.scrollTo(0,e);n(t)()}}function o(){window.scrollTo(0,0);document.querySelector("#q").focus()}function s(n){return function(){var e=document.querySelector(".result[data-vim-selected] h3 a");if(e!==null){var t=e.getAttribute("href");if(n){window.open(t)}else{window.location.href=t}}}}function l(e){var n={};for(var t in d){var i=d[t];n[i.cat]=n[i.cat]||[];n[i.cat].push(i)}var r=Object.keys(n).sort(function(e,t){return n[t].length-n[e].length});if(r.length===0){return}var a='<a href="#" class="close" aria-label="close" title="close">×</a>';a+="<h3>How to navigate searx with Vim-like hotkeys</h3>";a+="<table>";for(var o=0;o<r.length;o++){var s=n[r[o]];var l=o===r.length-1;var u=o%2===0;if(u){a+="<tr>"}a+="<td>";a+="<h4>"+s[0].cat+"</h4>";a+='<ul class="list-unstyled">';for(var c in s){a+="<li><kbd>"+s[c].key+"</kbd> "+s[c].des+"</li>"}a+="</ul>";a+="</td>";if(!u||l){a+="</tr>"}}a+="</table>";e.innerHTML=a}function u(){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%";l(e);var t=document.getElementsByTagName("body")[0];t.appendChild(e)}else{e.classList.toggle("invisible");return}}});(function(e,c,v){"use strict";v.ready(function(){v.on(".searx_overpass_request","click",function(e){this.classList.remove("searx_overpass_request");var t="https://overpass-api.de/api/interpreter?data=";var n=t+"[out:json][timeout:25];(";var i=");out meta;";var r=this.dataset.osmId;var a=this.dataset.osmType;var o=c.querySelector("#"+this.dataset.resultTable);var s=c.querySelector("#"+this.dataset.resultTableLoadicon);var l=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(r&&a&&o){var u=null;switch(a){case"node":u=n+"node("+r+");"+i;break;case"way":u=n+"way("+r+");"+i;break;case"relation":u=n+"relation("+r+");"+i;break;default:break}if(u){v.http("GET",u).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||l.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>"}}s.parentNode.removeChild(s);o.classList.remove("invisible");o.querySelector("tbody").innerHTML=i}}).catch(function(){s.classList.remove("invisible");s.innerHTML="could not load data!"})}}e.preventDefault()});v.on(".searx_init_map","click",function(e){this.classList.remove("searx_init_map");var d=this.dataset.leafletTarget;var f=parseFloat(this.dataset.mapLon);var p=parseFloat(this.dataset.mapLat);var h=parseFloat(this.dataset.mapZoom);var m=JSON.parse(this.dataset.mapBoundingbox);var g=JSON.parse(this.dataset.mapGeojson);v.loadStyle("leaflet/leaflet.css");v.loadScript("leaflet/leaflet.js",function(){var e=null;if(m){var t=L.latLng(m[0],m[2]);var n=L.latLng(m[1],m[3]);e=L.latLngBounds(t,n)}var i=L.map(d);var r="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";var a='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';var o=new L.TileLayer(r,{minZoom:1,maxZoom:19,attribution:a});var s="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png";var l='Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';var u=new L.TileLayer(s,{minZoom:1,maxZoom:19,attribution:l});if(e){setTimeout(function(){i.fitBounds(e,{maxZoom:17})},0)}else if(f&&p){if(h){i.setView(new L.latLng(p,f),h)}else{i.setView(new L.latLng(p,f),8)}}i.addLayer(o);var c={"OSM Mapnik":o};L.control.layers(c).addTo(i);if(g){L.geoJson(g).addTo(i)}});e.preventDefault()})})})(window,document,window.searx);(function(e,o,t){"use strict";t.ready(function(){t.image_thumbnail_layout=new t.ImageLayout("#urls","#urls .result-images","img.image_thumbnail",200);t.image_thumbnail_layout.watch();t.on(".btn-collapse","click",function(e){var t=this.getAttribute("data-btn-text-collapsed");var n=this.getAttribute("data-btn-text-not-collapsed");var i=this.getAttribute("data-target");var r=o.querySelector(i);var a=this.innerHTML;if(this.classList.contains("collapsed")){a=a.replace(t,n)}else{a=a.replace(n,t)}this.innerHTML=a;this.classList.toggle("collapsed");r.classList.toggle("invisible")});t.on(".media-loader","click",function(e){var t=this.getAttribute("data-target");var n=o.querySelector(t+" > iframe");var i=n.getAttribute("src");if(i===null||i===undefined||i===false){n.setAttribute("src",n.getAttribute("data-src"))}});e.addEventListener("scroll",function(){var e=o.getElementById("backToTop"),t=document.documentElement.scrollTop||document.body.scrollTop;if(e!==null){if(t>=200){e.style.opacity=1}else{e.style.opacity=0}}})})})(window,document,window.searx);(function(t,i,n){"use strict";var r=true,a="q",o;function s(e){if(e.setSelectionRange){var t=e.value.length;e.setSelectionRange(t,t)}}function l(){if(o.value.length>0){var e=document.getElementById("search");setTimeout(e.submit.bind(e),0)}}function u(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(){o=i.getElementById(a);function e(e){if(r){s(o);r=false}else{}}if(o!==null){u(o);if(n.autocompleter){n.autocomplete=AutoComplete.call(t,{Url:"./autocompleter",EmptyMessage:n.no_item_found,HttpMethod:n.method,MinChars:4,Delay:300},"#"+a);t.addEventListener("resize",function(){var e=new CustomEvent("position");o.dispatchEvent(e)})}o.addEventListener("focus",e,false);o.focus()}if(o!==null&&n.search_on_category_select){i.querySelector(".help").className="invisible";n.on("#categories input","change",function(e){var t,n=i.querySelectorAll('#categories input[type="checkbox"]');for(t=0;t<n.length;t++){if(n[t]!==this&&n[t].checked){n[t].click()}}if(!this.checked){this.click()}l();return false});n.on(i.getElementById("time_range"),"change",l);n.on(i.getElementById("language"),"change",l)}})})(window,document,window.searx);
+(function(u,c){"use strict";function e(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}e.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};e.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"}};e.prototype._alignImgs=function(e){var t,n,i=c.querySelector(this.container_selector).clientWidth;e:while(e.length>0){for(var r=1;r<=e.length;r++){t=e.slice(0,r);n=this._getHeigth(t,i);if(n<this.maxHeight){this._setSize(t,n);e=e.slice(r);continue e}}this._setSize(t,Math.min(this.maxHeight,n));break}};e.prototype.align=function(e){var t=c.querySelectorAll(this.results_selector),n=t.length,i=null,r=null,a=[];for(var o=0;o<n;o++){r=t[o];if(r.previousElementSibling!==i&&a.length>0){this._alignImgs(a);a=[]}a.push(r.querySelector(this.img_selector));i=r}if(a.length>0){this._alignImgs(a)}};e.prototype.watch=function(){var e,t,n,i,r=this,a=c.querySelectorAll(this.results_selector),o=a.length;function s(e){r.align()}function l(e){if(r._alignAllDone){r._alignAllDone=false;setTimeout(function(){r.align();r._alignAllDone=true},100)}}u.addEventListener("resize",l);u.addEventListener("pageshow",s);for(e=0;e<o;e++){t=a[e].querySelector(this.img_selector);if(typeof t!=="undefined"){t.addEventListener("load",l);t.addEventListener("error",l)}}};u.searx.ImageLayout=e})(window,document);searx.ready(function(){searx.on(".result","click",function(){n(this)(true)});searx.on(".result a","focus",function(e){var t=e.target;while(t!==undefined){if(t.classList.contains("result")){if(t.getAttribute("data-vim-selected")===null){n(t)(true)}break}t=t.parentNode}},true);var d={27:{key:"Escape",fun:t,des:"remove focus from the focused input",cat:"Control"},73:{key:"i",fun:o,des:"focus on the search input",cat:"Control"},66:{key:"b",fun:r(-window.innerHeight),des:"scroll one page up",cat:"Navigation"},70:{key:"f",fun:r(window.innerHeight),des:"scroll one page down",cat:"Navigation"},85:{key:"u",fun:r(-window.innerHeight/2),des:"scroll half a page up",cat:"Navigation"},68:{key:"d",fun:r(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:n("up"),des:"select previous search result",cat:"Results"},74:{key:"j",fun:n("down"),des:"select next search result",cat:"Results"},80:{key:"p",fun:i(0),des:"go to previous page",cat:"Results"},78:{key:"n",fun:i(1),des:"go to next page",cat:"Results"},79:{key:"o",fun:s(false),des:"open search result",cat:"Results"},84:{key:"t",fun:s(true),des:"open the result in a new tab",cat:"Results"},82:{key:"r",fun:e,des:"reload page from the server",cat:"Control"},72:{key:"h",fun:u,des:"toggle help window",cat:"Other"}};searx.on(document,"keydown",function(e){if(d.hasOwnProperty(e.keyCode)&&!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var t=e.target.tagName.toLowerCase();if(e.keyCode===27){if(t==="input"||t==="select"||t==="textarea"){d[e.keyCode].fun()}}else{if(e.target===document.body||t==="a"||t==="button"){e.preventDefault();d[e.keyCode].fun()}}}});function n(d){return function(e){var t=document.querySelector(".result[data-vim-selected]"),n=d;if(t===null){t=document.querySelector(".result");if(t===null){return}if(d==="down"||d==="up"){n=t}}var i,r=document.querySelectorAll(".result");if(typeof n!=="string"){i=n}else{switch(n){case"visible":var a=document.documentElement.scrollTop||document.body.scrollTop;var o=a+document.documentElement.clientHeight;for(var s=0;s<r.length;s++){i=r[s];var l=i.offsetTop;var u=l+i.clientHeight;if(u<=o&&l>a){break}}break;case"down":i=t.nextElementSibling;if(i===null){i=r[0]}break;case"up":i=t.previousElementSibling;if(i===null){i=r[r.length-1]}break;case"bottom":i=r[r.length-1];break;case"top":default:i=r[0]}}if(i){t.removeAttribute("data-vim-selected");i.setAttribute("data-vim-selected","true");var c=i.querySelector("h3 a")||i.querySelector("a");if(c!==null){c.focus()}if(!e){f()}}}}function e(){document.location.reload(true)}function t(){if(document.activeElement){document.activeElement.blur()}}function i(t){return function(){var e=$('div#pagination button[type="submit"]');if(e.length!==2){console.log("page navigation with this theme is not supported");return}if(t>=0&&t<e.length){e[t].click()}else{console.log("pageButtonClick(): invalid argument")}}}function f(){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 r(e){return function(){window.scrollBy(0,e);n("visible")()}}function a(e,t){return function(){window.scrollTo(0,e);n(t)()}}function o(){window.scrollTo(0,0);document.querySelector("#q").focus()}function s(n){return function(){var e=document.querySelector(".result[data-vim-selected] h3 a");if(e!==null){var t=e.getAttribute("href");if(n){window.open(t)}else{window.location.href=t}}}}function l(e){var n={};for(var t in d){var i=d[t];n[i.cat]=n[i.cat]||[];n[i.cat].push(i)}var r=Object.keys(n).sort(function(e,t){return n[t].length-n[e].length});if(r.length===0){return}var a='<a href="#" class="close" aria-label="close" title="close">×</a>';a+="<h3>How to navigate searx with Vim-like hotkeys</h3>";a+="<table>";for(var o=0;o<r.length;o++){var s=n[r[o]];var l=o===r.length-1;var u=o%2===0;if(u){a+="<tr>"}a+="<td>";a+="<h4>"+s[0].cat+"</h4>";a+='<ul class="list-unstyled">';for(var c in s){a+="<li><kbd>"+s[c].key+"</kbd> "+s[c].des+"</li>"}a+="</ul>";a+="</td>";if(!u||l){a+="</tr>"}}a+="</table>";e.innerHTML=a}function u(){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%";l(e);var t=document.getElementsByTagName("body")[0];t.appendChild(e)}else{e.classList.toggle("invisible");return}}});(function(e,c,v){"use strict";v.ready(function(){v.on(".searx_overpass_request","click",function(e){this.classList.remove("searx_overpass_request");var t="https://overpass-api.de/api/interpreter?data=";var n=t+"[out:json][timeout:25];(";var i=");out meta;";var r=this.dataset.osmId;var a=this.dataset.osmType;var o=c.querySelector("#"+this.dataset.resultTable);var s=c.querySelector("#"+this.dataset.resultTableLoadicon);var l=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(r&&a&&o){var u=null;switch(a){case"node":u=n+"node("+r+");"+i;break;case"way":u=n+"way("+r+");"+i;break;case"relation":u=n+"relation("+r+");"+i;break;default:break}if(u){v.http("GET",u).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||l.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>"}}s.parentNode.removeChild(s);o.classList.remove("invisible");o.querySelector("tbody").innerHTML=i}}).catch(function(){s.classList.remove("invisible");s.innerHTML=could_not_load})}}e.preventDefault()});v.on(".searx_init_map","click",function(e){this.classList.remove("searx_init_map");var d=this.dataset.leafletTarget;var f=parseFloat(this.dataset.mapLon);var p=parseFloat(this.dataset.mapLat);var h=parseFloat(this.dataset.mapZoom);var m=JSON.parse(this.dataset.mapBoundingbox);var g=JSON.parse(this.dataset.mapGeojson);v.loadStyle("leaflet/leaflet.css");v.loadScript("leaflet/leaflet.js",function(){var e=null;if(m){var t=L.latLng(m[0],m[2]);var n=L.latLng(m[1],m[3]);e=L.latLngBounds(t,n)}var i=L.map(d);var r="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";var a='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';var o=new L.TileLayer(r,{minZoom:1,maxZoom:19,attribution:a});var s="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png";var l='Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';var u=new L.TileLayer(s,{minZoom:1,maxZoom:19,attribution:l});if(e){setTimeout(function(){i.fitBounds(e,{maxZoom:17})},0)}else if(f&&p){if(h){i.setView(new L.latLng(p,f),h)}else{i.setView(new L.latLng(p,f),8)}}i.addLayer(o);var c={"OSM Mapnik":o};L.control.layers(c).addTo(i);if(g){L.geoJson(g).addTo(i)}});e.preventDefault()})})})(window,document,window.searx);(function(e,o,t){"use strict";t.ready(function(){t.image_thumbnail_layout=new t.ImageLayout("#urls","#urls .result-images","img.image_thumbnail",200);t.image_thumbnail_layout.watch();t.on(".btn-collapse","click",function(e){var t=this.getAttribute("data-btn-text-collapsed");var n=this.getAttribute("data-btn-text-not-collapsed");var i=this.getAttribute("data-target");var r=o.querySelector(i);var a=this.innerHTML;if(this.classList.contains("collapsed")){a=a.replace(t,n)}else{a=a.replace(n,t)}this.innerHTML=a;this.classList.toggle("collapsed");r.classList.toggle("invisible")});t.on(".media-loader","click",function(e){var t=this.getAttribute("data-target");var n=o.querySelector(t+" > iframe");var i=n.getAttribute("src");if(i===null||i===undefined||i===false){n.setAttribute("src",n.getAttribute("data-src"))}});e.addEventListener("scroll",function(){var e=o.getElementById("backToTop"),t=document.documentElement.scrollTop||document.body.scrollTop;if(e!==null){if(t>=200){e.style.opacity=1}else{e.style.opacity=0}}})})})(window,document,window.searx);(function(t,i,n){"use strict";var r=true,a="q",o;function s(e){if(e.setSelectionRange){var t=e.value.length;e.setSelectionRange(t,t)}}function l(){if(o.value.length>0){var e=document.getElementById("search");setTimeout(e.submit.bind(e),0)}}function u(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(){o=i.getElementById(a);function e(e){if(r){s(o);r=false}else{}}if(o!==null){u(o);if(n.autocompleter){n.autocomplete=AutoComplete.call(t,{Url:"./autocompleter",EmptyMessage:n.no_item_found,HttpMethod:n.method,MinChars:4,Delay:300},"#"+a);t.addEventListener("resize",function(){var e=new CustomEvent("position");o.dispatchEvent(e)})}o.addEventListener("focus",e,false);o.focus()}if(o!==null&&n.search_on_category_select){i.querySelector(".help").className="invisible";n.on("#categories input","change",function(e){var t,n=i.querySelectorAll('#categories input[type="checkbox"]');for(t=0;t<n.length;t++){if(n[t]!==this&&n[t].checked){n[t].click()}}if(!this.checked){this.click()}l();return false});n.on(i.getElementById("time_range"),"change",l);n.on(i.getElementById("language"),"change",l)}})})(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 d7a1eeac8..81e7ddffa 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":["window","searx","w","d","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","static_path","id","replace","s","getElementById","createElement","setAttribute","body","appendChild","loadScript","hasAttribute","apply","insertBefore","newNode","referenceNode","element","insertAfter","nextSibling","classList","add","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","no_item_found","CustomEvent","dispatchEvent","search_on_category_select","checked"],"mappings":";;AAiBAA,OAAOC,MAAQ,SAAUC,EAAGC,GAE1B,aAMA,GAAID,EAAEE,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,IAIhB,IAAIvB,EAAQD,OAAOC,OAAS,GAE5BA,EAAM0B,GAAK,SAASC,EAAKC,EAAWT,EAAUU,GAC5CA,EAAaA,GAAc,MAC3B,UAAWF,IAAQ,SAAU,CAE3BA,EAAIG,iBAAiBF,EAAWT,EAAUU,OACrC,CAEL3B,EAAE4B,iBAAiBF,EAAW,SAASP,GACrC,IAAID,EAAKC,EAAEU,QAAUV,EAAEW,WAAYC,EAAQ,MAC3C,MAAOb,GAAMA,EAAGf,SAAWe,IAAOlB,KAAO+B,EAAQb,EAAGf,QAAQsB,IAAOP,EAAKA,EAAGc,cAC3E,GAAID,EAAOf,EAAaC,EAAUC,EAAIC,IACrCQ,KAIP7B,EAAMmC,MAAQ,SAAShB,GACrB,GAAIL,SAASsB,YAAc,UAAW,CACpCjB,EAASG,KAAKrB,OACT,CACLA,EAAE6B,iBAAiB,mBAAoBX,EAASkB,KAAKpC,MAIzDD,EAAMsC,KAAO,SAASC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Tlc,EAAM0B,GAAGxB,EAAEgE,eAAe,cAAe,SAAUgY,GACnDlc,EAAM0B,GAAGxB,EAAEgE,eAAe,YAAa,SAAUgY,OA/FvD,CAoGGnc,OAAQe,SAAUf,OAAOC","file":"searx.min.js"} \ No newline at end of file
+{"version":3,"sources":["searx.js"],"names":["window","searx","w","d","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","static_path","id","replace","s","getElementById","createElement","setAttribute","body","appendChild","loadScript","hasAttribute","apply","insertBefore","newNode","referenceNode","element","insertAfter","nextSibling","classList","add","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","could_not_load","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","no_item_found","CustomEvent","dispatchEvent","search_on_category_select","checked"],"mappings":";;AAiBAA,OAAOC,MAAQ,SAAUC,EAAGC,GAE1B,aAMA,GAAID,EAAEE,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,IAIhB,IAAIvB,EAAQD,OAAOC,OAAS,GAE5BA,EAAM0B,GAAK,SAASC,EAAKC,EAAWT,EAAUU,GAC5CA,EAAaA,GAAc,MAC3B,UAAWF,IAAQ,SAAU,CAE3BA,EAAIG,iBAAiBF,EAAWT,EAAUU,OACrC,CAEL3B,EAAE4B,iBAAiBF,EAAW,SAASP,GACrC,IAAID,EAAKC,EAAEU,QAAUV,EAAEW,WAAYC,EAAQ,MAC3C,MAAOb,GAAMA,EAAGf,SAAWe,IAAOlB,KAAO+B,EAAQb,EAAGf,QAAQsB,IAAOP,EAAKA,EAAGc,cAC3E,GAAID,EAAOf,EAAaC,EAAUC,EAAIC,IACrCQ,KAIP7B,EAAMmC,MAAQ,SAAShB,GACrB,GAAIL,SAASsB,YAAc,U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hW,GAAGgc,QAAS,CACnDhG,EAAWhW,GAAGgV,SAGlB,IAAMrV,KAAKqc,QAAS,CAClBrc,KAAKqV,QAEPmG,IACA,OAAO,QAGTnc,EAAM0B,GAAGxB,EAAEgE,eAAe,cAAe,SAAUiY,GACnDnc,EAAM0B,GAAGxB,EAAEgE,eAAe,YAAa,SAAUiY,OA/FvD,CAoGGpc,OAAQe,SAAUf,OAAOC","file":"searx.min.js"} \ No newline at end of file
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 869d07da0..267ac94cb 100644
--- a/searx/static/themes/simple/js/searx_src/searx_mapresult.js
+++ b/searx/static/themes/simple/js/searx_src/searx_mapresult.js
@@ -97,7 +97,7 @@
})
.catch(function() {
result_table_loadicon.classList.remove('invisible');
- result_table_loadicon.innerHTML = "could not load data!";
+ result_table_loadicon.innerHTML = could_not_load;
});
}
}
diff --git a/searx/templates/__common__/translations.js.tpl b/searx/templates/__common__/translations.js.tpl
new file mode 100644
index 000000000..8453aba69
--- /dev/null
+++ b/searx/templates/__common__/translations.js.tpl
@@ -0,0 +1 @@
+var could_not_load = '{{ _('could not load data') }}!';
diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html
index cd3d23df5..839619976 100644
--- a/searx/templates/oscar/base.html
+++ b/searx/templates/oscar/base.html
@@ -10,7 +10,7 @@
<meta name="referrer" content="no-referrer">
<meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=1.0, user-scalable=1" />
{% block meta %}{% endblock %}
-
+ <script src="{{ url_for('js_translations') }}"></script>
<title>{% block title %}{% endblock %}{{ instance_name }}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css" />
{% if preferences.get_value('oscar-style') -%}
diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html
index 650ef771c..5cb1e1757 100644
--- a/searx/templates/simple/base.html
+++ b/searx/templates/simple/base.html
@@ -12,6 +12,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<title>{% block title %}{% endblock %}{{ instance_name }}</title>
{% block meta %}{% endblock %}
+ <script src="{{ url_for('js_translations') }}"></script>
{% if rtl %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/searx-rtl.min.css') }}" type="text/css" media="screen" />
{% else %}
diff --git a/searx/webapp.py b/searx/webapp.py
index 2ba8ccfb8..68be25584 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -1021,6 +1021,14 @@ def config():
})
+@app.route('/translations.js')
+def js_translations():
+ return render(
+ 'translations.js.tpl',
+ override_theme='__common__',
+ ), {'Content-Type': 'text/javascript; charset=UTF-8'}
+
+
@app.errorhandler(404)
def page_not_found(e):
return render('404.html'), 404