Loading searx/engines/currency_convert.py +3 −2 Original line number Diff line number Diff line # SPDX-License-Identifier: AGPL-3.0-or-later # lint: pylint """Currency convert (DuckDuckGo) """ currency convert (DuckDuckGo) """ import json Loading Loading @@ -56,6 +56,7 @@ def response(resp): "conversion_rate": round(conversion_rate, 2), "source_url": source_url, "url": url, "content": "", } ) return results searx/plugins/search_on_category_select.py +2 −0 Original line number Diff line number Diff line Loading @@ -22,3 +22,5 @@ description = gettext( ) default_on = True preference_section = "ui" js_dependencies = ('plugins/js/search_on_category_select.js',) searx/search/processors/online_currency.py +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ from .online import OnlineProcessor parser_re = re.compile( r".*?(\\d+(?:\\.\\d+)?)\s?([^.0-9]+) (?:in|to|en|dans|nel|pour|para|zu|a) ([^.0-9]+)", '.*?(\\d+(?:\\.\\d+)?) ([^.0-9]+) (?:in|to|en|dans|nel|pour|para|zu|a) ([^.0-9]+)', re.I, ) Loading searx/settings.yml +2 −2 Original line number Diff line number Diff line Loading @@ -86,10 +86,10 @@ outgoing: # to the administrator useragent_suffix: "" # The maximum number of concurrent connections that may be established. pool_connections: 100 pool_connections: 200 # Allow the connection pool to maintain keep-alive connections below this # point. pool_maxsize: 20 pool_maxsize: 40 # See https://www.python-httpx.org/http2/ enable_http2: true # uncomment below section if you want to use a custom server certificate Loading searx/static/plugins/js/search_on_category_select.js 0 → 100644 +42 −0 Original line number Diff line number Diff line $(document).ready(function() { if($('#q').length) { $('#categories label[for^="checkbox_"]').click(function(e) { $('#categories input[type="checkbox"]').each(function(i, checkbox) { $(checkbox).prop('checked', false); }); $(document.getElementById($(this).attr("for"))).prop('checked', true); if($('#q').val()) { if (getHttpRequest() == "GET") { $('#search_form').attr('action', $('#search_form').serialize()); } $('#search_form').submit(); } return false; }); $('#time-range').change(function(e) { if($('#q').val()) { if (getHttpRequest() == "GET") { $('#search_form').attr('action', $('#search_form').serialize()); } $('#search_form').submit(); } }); $('#language').change(function(e) { if($('#q').val()) { if (getHttpRequest() == "GET") { $('#search_form').attr('action', $('#search_form').serialize()); } $('#search_form').submit(); } }); } }); function getHttpRequest() { httpRequest = "POST"; urlParams = new URLSearchParams(window.location.search); if (urlParams.has('method')) { httpRequest = urlParams.get('method'); } return httpRequest; } Loading
searx/engines/currency_convert.py +3 −2 Original line number Diff line number Diff line # SPDX-License-Identifier: AGPL-3.0-or-later # lint: pylint """Currency convert (DuckDuckGo) """ currency convert (DuckDuckGo) """ import json Loading Loading @@ -56,6 +56,7 @@ def response(resp): "conversion_rate": round(conversion_rate, 2), "source_url": source_url, "url": url, "content": "", } ) return results
searx/plugins/search_on_category_select.py +2 −0 Original line number Diff line number Diff line Loading @@ -22,3 +22,5 @@ description = gettext( ) default_on = True preference_section = "ui" js_dependencies = ('plugins/js/search_on_category_select.js',)
searx/search/processors/online_currency.py +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ from .online import OnlineProcessor parser_re = re.compile( r".*?(\\d+(?:\\.\\d+)?)\s?([^.0-9]+) (?:in|to|en|dans|nel|pour|para|zu|a) ([^.0-9]+)", '.*?(\\d+(?:\\.\\d+)?) ([^.0-9]+) (?:in|to|en|dans|nel|pour|para|zu|a) ([^.0-9]+)', re.I, ) Loading
searx/settings.yml +2 −2 Original line number Diff line number Diff line Loading @@ -86,10 +86,10 @@ outgoing: # to the administrator useragent_suffix: "" # The maximum number of concurrent connections that may be established. pool_connections: 100 pool_connections: 200 # Allow the connection pool to maintain keep-alive connections below this # point. pool_maxsize: 20 pool_maxsize: 40 # See https://www.python-httpx.org/http2/ enable_http2: true # uncomment below section if you want to use a custom server certificate Loading
searx/static/plugins/js/search_on_category_select.js 0 → 100644 +42 −0 Original line number Diff line number Diff line $(document).ready(function() { if($('#q').length) { $('#categories label[for^="checkbox_"]').click(function(e) { $('#categories input[type="checkbox"]').each(function(i, checkbox) { $(checkbox).prop('checked', false); }); $(document.getElementById($(this).attr("for"))).prop('checked', true); if($('#q').val()) { if (getHttpRequest() == "GET") { $('#search_form').attr('action', $('#search_form').serialize()); } $('#search_form').submit(); } return false; }); $('#time-range').change(function(e) { if($('#q').val()) { if (getHttpRequest() == "GET") { $('#search_form').attr('action', $('#search_form').serialize()); } $('#search_form').submit(); } }); $('#language').change(function(e) { if($('#q').val()) { if (getHttpRequest() == "GET") { $('#search_form').attr('action', $('#search_form').serialize()); } $('#search_form').submit(); } }); } }); function getHttpRequest() { httpRequest = "POST"; urlParams = new URLSearchParams(window.location.search); if (urlParams.has('method')) { httpRequest = urlParams.get('method'); } return httpRequest; }