logo

searx

My custom branche(s) on searx, a meta-search engine
commit: e19eeeefa0358d4f39b6708ac4bdb036f2c4e733
parent: f79f6713b0ce825d3b3faf93a61581bba74163b7
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Wed, 27 May 2015 23:26:24 +0200

[fix] do not submit form if there is no search query - fixes #341

Diffstat:

Msearx/static/js/search_on_category_select.js4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/searx/static/js/search_on_category_select.js b/searx/static/js/search_on_category_select.js @@ -7,7 +7,9 @@ $(document).ready(function() { $('#categories label').removeClass('btn-primary').removeClass('active').addClass('btn-default'); $(this).removeClass('btn-default').addClass('btn-primary').addClass('active'); $($(this).children()[0]).prop('checked', 'checked'); - $('#search_form').submit(); + if($('#q').val()) { + $('#search_form').submit(); + } return false; }); }