mirror of
https://github.com/searxng/searxng.git
synced 2024-09-12 16:30:33 +02:00
25 lines
771 B
JavaScript
25 lines
771 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').change(function(e) {
|
|
if($('#q').val()) {
|
|
$('#search_form').submit();
|
|
}
|
|
});
|
|
$('#language').change(function(e) {
|
|
if($('#q').val()) {
|
|
$('#search_form').submit();
|
|
}
|
|
});
|
|
}
|
|
});
|