mirror of
https://github.com/searxng/searxng.git
synced 2024-09-17 18:50:16 +02:00
20 lines
633 B
JavaScript
20 lines
633 B
JavaScript
$(document).ready(function() {
|
|
if($('#q').length) {
|
|
$('#categories label').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()) {
|
|
$('#search_form').submit();
|
|
}
|
|
return false;
|
|
});
|
|
$('#time-range > option').click(function(e) {
|
|
if($('#q').val()) {
|
|
$('#search_form').submit();
|
|
}
|
|
});
|
|
}
|
|
});
|