From a11230819ff76312b4528b2bfb6e03d0560075b1 Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 20 Sep 2016 15:19:02 -0500 Subject: [PATCH] automatic search when language is selected --- searx/static/plugins/js/search_on_category_select.js | 5 +++++ searx/templates/oscar/languages.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/searx/static/plugins/js/search_on_category_select.js b/searx/static/plugins/js/search_on_category_select.js index 19aeef94..a76fd126 100644 --- a/searx/static/plugins/js/search_on_category_select.js +++ b/searx/static/plugins/js/search_on_category_select.js @@ -15,5 +15,10 @@ $(document).ready(function() { $('#search_form').submit(); } }); + $('#language').change(function(e) { + if($('#q').val()) { + $('#search_form').submit(); + } + }); } }); diff --git a/searx/templates/oscar/languages.html b/searx/templates/oscar/languages.html index 3aa6376a..03df0682 100644 --- a/searx/templates/oscar/languages.html +++ b/searx/templates/oscar/languages.html @@ -1,7 +1,7 @@ {% if preferences %} +