diff --git a/searx/static/themes/oscar/js/searx.js b/searx/static/themes/oscar/js/searx.js index 159344b28..163009481 100644 --- a/searx/static/themes/oscar/js/searx.js +++ b/searx/static/themes/oscar/js/searx.js @@ -25,7 +25,8 @@ window.searx = (function(d) { return { autocompleter: script.getAttribute('data-autocompleter') === 'true', - method: script.getAttribute('data-method') + method: script.getAttribute('data-method'), + translations: JSON.parse(script.getAttribute('data-translations')) }; })(document); ;/** @@ -302,7 +303,7 @@ $(document).ready(function(){ } }) .fail(function() { - $(result_table_loadicon).html($(result_table_loadicon).html() + "
"+could_not_load+"
"); + $(result_table_loadicon).html($(result_table_loadicon).html() + ""+searx.translations.could_not_load+"
"); }); } } diff --git a/searx/static/themes/oscar/js/searx.min.js b/searx/static/themes/oscar/js/searx.min.js index 71d67ae7f..0021f599c 100644 --- a/searx/static/themes/oscar/js/searx.min.js +++ b/searx/static/themes/oscar/js/searx.min.js @@ -1,4 +1,4 @@ /*! oscar/searx.min.js | 16-03-2021 | */ -window.searx=function(t){"use strict";var a,a=t.currentScript||(a=t.getElementsByTagName("script"))[a.length-1];return{autocompleter:"true"===a.getAttribute("data-autocompleter"),method:a.getAttribute("data-method")}}(document),$(document).ready(function(){var t,e="";searx.autocompleter&&((t=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:{url:"./autocompleter?q=%QUERY",wildcard:"%QUERY"}})).initialize(),$("#q").on("keydown",function(t){13==t.which&&(e=$("#q").val())}),$("#q").typeahead({name:"search-results",highlight:!1,hint:!0,displayKey:function(t){return t},classNames:{input:"tt-input",hint:"tt-hint",menu:"tt-dropdown-menu",dataset:"tt-dataset-search-results"}},{name:"autocomplete",source:t}),$("#q").bind("typeahead:select",function(t,a){e&&$("#q").val(e),$("#search_form").submit()}))}),$(document).ready(function(){$("#q.autofocus").focus(),$("#clear_search").click(function(){document.getElementById("q").value=""}),$(".select-all-on-click").click(function(){$(this).select()}),$(".btn-collapse").click(function(){var t=$(this).data("btn-text-collapsed"),a=$(this).data("btn-text-not-collapsed");""!==t&&""!==a&&(new_html=$(this).hasClass("collapsed")?$(this).html().replace(t,a):$(this).html().replace(a,t),$(this).html(new_html))}),$(".btn-toggle .btn").click(function(){var t="btn-"+$(this).data("btn-class"),a=$(this).data("btn-label-default"),e=$(this).data("btn-label-toggled");""!==e&&(new_html=$(this).hasClass("btn-default")?$(this).html().replace(a,e):$(this).html().replace(e,a),$(this).html(new_html)),$(this).toggleClass(t),$(this).toggleClass("btn-default")}),$(".media-loader").click(function(){var t=$(this).data("target"),a=$(t+" > iframe"),t=a.attr("src");void 0!==t&&!1!==t||a.attr("src",a.data("src"))}),$(".btn-sm").dblclick(function(){var t="btn-"+$(this).data("btn-class");$(this).hasClass("btn-default")?($(".btn-sm > input").attr("checked","checked"),$(".btn-sm > input").prop("checked",!0),$(".btn-sm").addClass(t),$(".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(t),$(".btn-sm").removeClass("active"),$(".btn-sm").addClass("btn-default"))}),$(".nav-tabs").click(function(t){$(t.target).parents("ul").children().attr("aria-selected","false"),$(t.target).parent().attr("aria-selected","true")})}),window.addEventListener("load",function(){$(".infobox").each(function(){var t=$(this).find(".infobox_body");t.prop("scrollHeight")+t.find("img.infobox_part").height()<=t.css("max-height").replace("px","")&&$(this).find(".infobox_toggle").hide()})}),$(document).ready(function(){$(".searx_overpass_request").on("click",function(t){var a="https://overpass-api.de/api/interpreter?data=[out:json][timeout:25];(",e=");out meta;",s=$(this).data("osm-id"),n=$(this).data("osm-type"),i=$(this).data("result-table"),o="#"+$(this).data("result-table-loadicon"),r=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(s&&n&&i){var i="#"+i,c=null;switch(n){case"node":c=a+"node("+s+");"+e;break;case"way":c=a+"way("+s+");"+e;break;case"relation":c=a+"relation("+s+");"+e}c&&$.ajax(c).done(function(t){if(t&&t.elements&&t.elements[0]){var a,e=t.elements[0],s=$(i).html();for(a in e.tags)if(null===e.tags.name||-1==r.indexOf(a)){switch(s+="'+could_not_load+"
")})}$(this).off(t)}),$(".searx_init_map").on("click",function(t){var a=$(this).data("leaflet-target"),e=$(this).data("map-lon"),s=$(this).data("map-lat"),n=$(this).data("map-zoom"),i=$(this).data("map-boundingbox"),o=$(this).data("map-geojson");i&&(southWest=L.latLng(i[0],i[2]),northEast=L.latLng(i[1],i[3]),map_bounds=L.latLngBounds(southWest,northEast)),L.Icon.Default.imagePath="./static/themes/oscar/css/images/";var r=L.map(a),a=new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Map data © OpenStreetMap contributors'});new L.TileLayer("https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Wikimedia maps beta | Maps data © OpenStreetMap contributors'});setTimeout(function(){map_bounds?r.fitBounds(map_bounds,{maxZoom:17}):e&&s&&(n?r.setView(new L.LatLng(s,e),n):r.setView(new L.LatLng(s,e),8))},0),r.addLayer(a),L.control.layers({"OSM Mapnik":a}).addTo(r),o&&L.geoJson(o).addTo(r),$(this).off(t)})}),$(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})})}); +window.searx=function(t){"use strict";var a,a=t.currentScript||(a=t.getElementsByTagName("script"))[a.length-1];return{autocompleter:"true"===a.getAttribute("data-autocompleter"),method:a.getAttribute("data-method"),translations:JSON.parse(a.getAttribute("data-translations"))}}(document),$(document).ready(function(){var t,e="";searx.autocompleter&&((t=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:{url:"./autocompleter?q=%QUERY",wildcard:"%QUERY"}})).initialize(),$("#q").on("keydown",function(t){13==t.which&&(e=$("#q").val())}),$("#q").typeahead({name:"search-results",highlight:!1,hint:!0,displayKey:function(t){return t},classNames:{input:"tt-input",hint:"tt-hint",menu:"tt-dropdown-menu",dataset:"tt-dataset-search-results"}},{name:"autocomplete",source:t}),$("#q").bind("typeahead:select",function(t,a){e&&$("#q").val(e),$("#search_form").submit()}))}),$(document).ready(function(){$("#q.autofocus").focus(),$("#clear_search").click(function(){document.getElementById("q").value=""}),$(".select-all-on-click").click(function(){$(this).select()}),$(".btn-collapse").click(function(){var t=$(this).data("btn-text-collapsed"),a=$(this).data("btn-text-not-collapsed");""!==t&&""!==a&&(new_html=$(this).hasClass("collapsed")?$(this).html().replace(t,a):$(this).html().replace(a,t),$(this).html(new_html))}),$(".btn-toggle .btn").click(function(){var t="btn-"+$(this).data("btn-class"),a=$(this).data("btn-label-default"),e=$(this).data("btn-label-toggled");""!==e&&(new_html=$(this).hasClass("btn-default")?$(this).html().replace(a,e):$(this).html().replace(e,a),$(this).html(new_html)),$(this).toggleClass(t),$(this).toggleClass("btn-default")}),$(".media-loader").click(function(){var t=$(this).data("target"),a=$(t+" > iframe"),t=a.attr("src");void 0!==t&&!1!==t||a.attr("src",a.data("src"))}),$(".btn-sm").dblclick(function(){var t="btn-"+$(this).data("btn-class");$(this).hasClass("btn-default")?($(".btn-sm > input").attr("checked","checked"),$(".btn-sm > input").prop("checked",!0),$(".btn-sm").addClass(t),$(".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(t),$(".btn-sm").removeClass("active"),$(".btn-sm").addClass("btn-default"))}),$(".nav-tabs").click(function(t){$(t.target).parents("ul").children().attr("aria-selected","false"),$(t.target).parent().attr("aria-selected","true")})}),window.addEventListener("load",function(){$(".infobox").each(function(){var t=$(this).find(".infobox_body");t.prop("scrollHeight")+t.find("img.infobox_part").height()<=t.css("max-height").replace("px","")&&$(this).find(".infobox_toggle").hide()})}),$(document).ready(function(){$(".searx_overpass_request").on("click",function(t){var a="https://overpass-api.de/api/interpreter?data=[out:json][timeout:25];(",e=");out meta;",s=$(this).data("osm-id"),n=$(this).data("osm-type"),i=$(this).data("result-table"),o="#"+$(this).data("result-table-loadicon"),r=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(s&&n&&i){var i="#"+i,l=null;switch(n){case"node":l=a+"node("+s+");"+e;break;case"way":l=a+"way("+s+");"+e;break;case"relation":l=a+"relation("+s+");"+e}l&&$.ajax(l).done(function(t){if(t&&t.elements&&t.elements[0]){var a,e=t.elements[0],s=$(i).html();for(a in e.tags)if(null===e.tags.name||-1==r.indexOf(a)){switch(s+="'+searx.translations.could_not_load+"
")})}$(this).off(t)}),$(".searx_init_map").on("click",function(t){var a=$(this).data("leaflet-target"),e=$(this).data("map-lon"),s=$(this).data("map-lat"),n=$(this).data("map-zoom"),i=$(this).data("map-boundingbox"),o=$(this).data("map-geojson");i&&(southWest=L.latLng(i[0],i[2]),northEast=L.latLng(i[1],i[3]),map_bounds=L.latLngBounds(southWest,northEast)),L.Icon.Default.imagePath="./static/themes/oscar/css/images/";var r=L.map(a),a=new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Map data © OpenStreetMap contributors'});new L.TileLayer("https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Wikimedia maps beta | Maps data © OpenStreetMap contributors'});setTimeout(function(){map_bounds?r.fitBounds(map_bounds,{maxZoom:17}):e&&s&&(n?r.setView(new L.LatLng(s,e),n):r.setView(new L.LatLng(s,e),8))},0),r.addLayer(a),L.control.layers({"OSM Mapnik":a}).addTo(r),o&&L.geoJson(o).addTo(r),$(this).off(t)})}),$(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})})}); //# sourceMappingURL=searx.min.js.map \ No newline at end of file diff --git a/searx/static/themes/oscar/js/searx.min.js.map b/searx/static/themes/oscar/js/searx.min.js.map index 11b3a9102..13e949a74 100644 --- a/searx/static/themes/oscar/js/searx.min.js.map +++ b/searx/static/themes/oscar/js/searx.min.js.map @@ -1 +1 @@ -{"version":3,"file":"searx.min.js","sources":["searx.js"],"names":["window","searx","d","scripts","script","currentScript","getElementsByTagName","length","autocompleter","getAttribute","method","document","$","ready","searchResults","original_search_value","Bloodhound","datumTokenizer","tokenizers","obj","whitespace","queryTokenizer","remote","url","wildcard","initialize","on","e","which","val","typeahead","name","highlight","hint","displayKey","result","classNames","input","menu","dataset","source","bind","ev","suggestion","submit","focus","click","getElementById","value","this","select","btnTextCollapsed","data","btnTextNotCollapsed","new_html","hasClass","html","replace","btnClass","btnLabelDefault","btnLabelToggled","toggleClass","target","iframe_load","srctest","attr","undefined","dblclick","prop","addClass","removeClass","removeAttr","checked","a","parents","children","parent","addEventListener","each","infobox_body","find","height","css","hide","event","query_start","overpass_url","query_end","osm_id","osm_type","result_table","result_table_loadicon","osm_ignore_tags","query","ajax","done","elements","row","element","newHtml","tags","indexOf","substring","fail","could_not_load","off","leaflet_target","map_lon","map_lat","map_zoom","map_boundingbox","map_geojson","southWest","L","latLng","northEast","map_bounds","latLngBounds","Icon","Default","imagePath","map","osmMapnik","TileLayer","minZoom","maxZoom","attribution","setTimeout","fitBounds","setView","LatLng","addLayer","control","layers","OSM Mapnik","addTo","geoJson"],"mappings":";;AAgBAA,OAAOC,MAAQ,SAAUC,gBAIrB,IACQC,EADJC,EAASF,EAAEG,gBACPF,EAAUD,EAAEI,qBAAqB,WACtBH,EAAQI,OAAS,GAGpC,MAAO,CACHC,cAA6D,SAA9CJ,EAAOK,aAAa,sBACnCC,OAAQN,EAAOK,aAAa,gBAXrB,CAaZE,UAkBHC,EAAED,UAAUE,MAA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EAAY,IAAIT,EAAEU,UAFL,qDAE6B,CAACC,QAAS,EAAGC,QAAS,GAAIC,YADpD,kFAKD,IAAIb,EAAEU,UAFL,sDAEgC,CAACC,QAAS,EAAGC,QAAS,GAAIC,YADrD,yGAIzBC,WAAW,WACJX,WACCK,EAAIO,UAAUZ,WAAY,CACtBS,QAAQ,KAELlB,GAAWC,IACfC,EACCY,EAAIQ,QAAQ,IAAIhB,EAAEiB,OAAOtB,EAASD,GAASE,GAE3CY,EAAIQ,QAAQ,IAAIhB,EAAEiB,OAAOtB,EAASD,GAAS,KAEpD,GAEHc,EAAIU,SAAST,GAObT,EAAEmB,QAAQC,OALO,CACbC,aAAcZ,IAIWa,MAAMd,GAEhCV,GACCE,EAAEuB,QAAQzB,GAAawB,MAAMd,GAKjC7G,EAAGqC,MAAOwD,IAAKrB,OAGtBxE,EAAED,UAAUE,MAAM,WACfD,EAAE,sBAAsBkC,MAAM,WAC1BlC,EAAE,yBAAyBkE,KAAK,WAAa7B,KAAKuB,SAAU,MAGhE5D,EAAE,wBAAwBkC,MAAM,WAC5BlC,EAAE,yBAAyBkE,KAAK,WAAa7B,KAAKuB,SAAU"} \ No newline at end of file +{"version":3,"file":"searx.min.js","sources":["searx.js"],"names":["window","searx","d","scripts","script","currentScript","getElementsByTagName","length","autocompleter","getAttribute","method","translations","JSON","parse","document","$","ready","searchResults","original_search_value","Bloodhound","datumTokenizer","tokenizers","obj","whitespace","queryTokenizer","remote","url","wildcard","initialize","on","e","which","val","typeahead","name","highlight","hint","displayKey","result","classNames","input","menu","dataset","source","bind","ev","suggestion","submit","focus","click","getElementById","value","this","select","btnTextCollapsed","data","btnTextNotCollapsed","new_html","hasClass","html","replace","btnClass","btnLabelDefault","btnLabelToggled","toggleClass","target","iframe_load","srctest","attr","undefined","dblclick","prop","addClass","removeClass","removeAttr","checked","a","parents","children","parent","addEventListener","each","infobox_body","find","height","css","hide","event","query_start","overpass_url","query_end","osm_id","osm_type","result_table","result_table_loadicon","osm_ignore_tags","query","ajax","done","elements","row","element","newHtml","tags","indexOf","substring","fail","could_not_load","off","leaflet_target","map_lon","map_lat","map_zoom","map_boundingbox","map_geojson","southWest","L","latLng","northEast","map_bounds","latLngBounds","Icon","Default","imagePath","map","osmMapnik","TileLayer","minZoom","maxZoom","attribution","setTimeout","fitBounds","setView","LatLng","addLayer","control","layers","OSM Mapnik","addTo","geoJson"],"mappings":";;AAgBAA,OAAOC,MAAQ,SAAUC,gBAIrB,IACQC,EADJC,EAASF,EAAEG,gBACPF,EAAUD,EAAEI,qBAAqB,WACtBH,EAAQI,OAAS,GAGpC,MAAO,CACHC,cAA6D,SAA9CJ,EAAOK,aAAa,sBACnCC,OAAQN,EAAOK,aAAa,eAC5BE,aAAcC,KAAKC,MAAMT,EAAOK,aAAa,uBAZtC,CAcZK,UAkBHC,EAAED,UAAUE,MAAM,WACd,IAEQC,EAFJC,EAAwB,GACzBjB,MAAMO,iBACDS,EAAgB,IAAIE,WAAW,CAC/BC,eAAgBD,WAAWE,WAAWC,IAAIC,WAAW,SACrDC,eAAgBL,WAAWE,WAAWE,WACtCE,OAAQ,CACJC,IAAK,2BACLC,SAAU,aAGJC,aAEdb,EAAE,MAAMc,GAAG,UAAW,SAASC,GACtB,IAAXA,EAAEC,QACQb,EAAwBH,EAAE,MAAMiB,SAGxCjB,EAAE,MAAMkB,UAAU,CACdC,KAAM,iBACNC,WAAW,EACXC,MAAM,EACNC,WAAY,SAASC,GACjB,OAAOA,GAEXC,WAAY,CACRC,MAAO,WACPJ,KAAM,UACNK,KAAM,mBACNC,QAAS,8BAEd,CACCR,KAAM,eACNS,OAAQ1B,IAEZF,EAAE,MAAM6B,KAAK,mBAAoB,SAASC,EAAIC,GACvC5B,GACCH,EAAE,MAAMiB,IAAId,GAEhBH,EAAE,gBAAgBgC,cAqB9BhC,EAAED,UAAUE,MAAM,WAIdD,EAAE,gBAAgBiC,QAKlBjC,EAAE,iBAAiBkC,MAAM,WAC5BnC,SAASoC,eAAe,KAAKC,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AAK,WAAa7B,KAAKuB,SAAU"} \ No newline at end of file diff --git a/searx/static/themes/oscar/src/js/01_init.js b/searx/static/themes/oscar/src/js/01_init.js index 690365c7f..dd8de4ddb 100644 --- a/searx/static/themes/oscar/src/js/01_init.js +++ b/searx/static/themes/oscar/src/js/01_init.js @@ -25,6 +25,7 @@ window.searx = (function(d) { return { autocompleter: script.getAttribute('data-autocompleter') === 'true', - method: script.getAttribute('data-method') + method: script.getAttribute('data-method'), + translations: JSON.parse(script.getAttribute('data-translations')) }; })(document); diff --git a/searx/static/themes/oscar/src/js/leaflet_map.js b/searx/static/themes/oscar/src/js/leaflet_map.js index d1e102ff6..83364b0c3 100644 --- a/searx/static/themes/oscar/src/js/leaflet_map.js +++ b/searx/static/themes/oscar/src/js/leaflet_map.js @@ -90,7 +90,7 @@ $(document).ready(function(){ } }) .fail(function() { - $(result_table_loadicon).html($(result_table_loadicon).html() + ""+could_not_load+"
"); + $(result_table_loadicon).html($(result_table_loadicon).html() + ""+searx.translations.could_not_load+"
"); }); } } diff --git a/searx/static/themes/simple/js/searx.head.js b/searx/static/themes/simple/js/searx.head.js index 3ac61c8ae..e6964400b 100644 --- a/searx/static/themes/simple/js/searx.head.js +++ b/searx/static/themes/simple/js/searx.head.js @@ -32,7 +32,7 @@ search_on_category_select: script.getAttribute('data-search-on-category-select') === 'true', infinite_scroll: script.getAttribute('data-infinite-scroll') === 'true', static_path: script.getAttribute('data-static-path'), - no_item_found: script.getAttribute('data-no-item-found') + translations: JSON.parse(script.getAttribute('data-translations')), } // update the css diff --git a/searx/static/themes/simple/js/searx.head.min.js b/searx/static/themes/simple/js/searx.head.min.js index 19de1e498..5c87d749b 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 | 16-03-2021 | */ -(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); +(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"),translations:JSON.parse(a.getAttribute("data-translations"))};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.head.min.js.map b/searx/static/themes/simple/js/searx.head.min.js.map index d19ad5a44..a233d297b 100644 --- a/searx/static/themes/simple/js/searx.head.min.js.map +++ b/searx/static/themes/simple/js/searx.head.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["searx.head.js"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searx","touch","DocumentTouch","document","method","getAttribute","autocompleter","search_on_category_select","infinite_scroll","static_path","no_item_found","className","window"],"mappings":";;CAiBA,SAAUA,EAAGC,GACT,aAGA,IAAIC,EAASD,EAAEE,eAAkB,WAC7B,IAAIC,EAAUH,EAAEI,qBAAqB,UACrC,OAAOD,EAAQA,EAAQE,OAAS,GAFH,GAMjCN,EAAEO,MAAQ,CACNC,MAAS,iBAAkBR,GAAMA,EAAES,eAAiBC,oBAAoBD,eAAkB,MAC1FE,OAAQT,EAAOU,aAAa,eAC5BC,cAAeX,EAAOU,aAAa,wBAA0B,OAC7DE,0BAA2BZ,EAAOU,aAAa,oCAAsC,OACrFG,gBAAiBb,EAAOU,aAAa,0BAA4B,OACjEI,YAAad,EAAOU,aAAa,oBACjCK,cAAef,EAAOU,aAAa,uBAIvCX,EAAEI,qBAAqB,QAAQ,GAAGa,UAAalB,EAAEO,MAAW,MAAE,WAAW,MArB7E,CAsBGY,OAAQT","file":"searx.head.min.js"} \ No newline at end of file +{"version":3,"sources":["searx.head.js"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searx","touch","DocumentTouch","document","method","getAttribute","autocompleter","search_on_category_select","infinite_scroll","static_path","translations","JSON","parse","className","window"],"mappings":";;CAiBA,SAAUA,EAAGC,GACT,aAGA,IAAIC,EAASD,EAAEE,eAAkB,WAC7B,IAAIC,EAAUH,EAAEI,qBAAqB,UACrC,OAAOD,EAAQA,EAAQE,OAAS,GAFH,GAMjCN,EAAEO,MAAQ,CACNC,MAAS,iBAAkBR,GAAMA,EAAES,eAAiBC,oBAAoBD,eAAkB,MAC1FE,OAAQT,EAAOU,aAAa,eAC5BC,cAAeX,EAAOU,aAAa,wBAA0B,OAC7DE,0BAA2BZ,EAAOU,aAAa,oCAAsC,OACrFG,gBAAiBb,EAAOU,aAAa,0BAA4B,OACjEI,YAAad,EAAOU,aAAa,oBACjCK,aAAcC,KAAKC,MAAMjB,EAAOU,aAAa,uBAIjDX,EAAEI,qBAAqB,QAAQ,GAAGe,UAAapB,EAAEO,MAAW,MAAE,WAAW,MArB7E,CAsBGc,OAAQX","file":"searx.head.min.js"} \ 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 8fb2471b0..1abe81e4d 100644 --- a/searx/static/themes/simple/js/searx.js +++ b/searx/static/themes/simple/js/searx.js @@ -1529,7 +1529,7 @@ module.exports = AutoComplete; if (searx.autocompleter) { searx.autocomplete = AutoComplete.call(w, { Url: "./autocompleter", - EmptyMessage: searx.no_item_found, + EmptyMessage: searx.translations.no_item_found, HttpMethod: searx.method, HttpHeaders: { "Content-type": "application/x-www-form-urlencoded", diff --git a/searx/static/themes/simple/js/searx.min.js b/searx/static/themes/simple/js/searx.min.js index 731e9ca7c..3b2b9d762 100644 --- a/searx/static/themes/simple/js/searx.min.js +++ b/searx/static/themes/simple/js/searx.min.js @@ -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";a+=""+s[0].cat+"";a+='
| ";if(!u||l){a+=""}}a+="
";a+=""+s[0].cat+"";a+='
| ";if(!u||l){a+=""}}a+="