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 19aeef944..a76fd1266 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 3aa6376a2..03df06823 100644 --- a/searx/templates/oscar/languages.html +++ b/searx/templates/oscar/languages.html @@ -1,7 +1,7 @@ {% if preferences %} +