forked from Icycoide/searxng
Merge branch 'master' into csp-oscar-theme
This commit is contained in:
commit
ca1c3bd15d
68 changed files with 7299 additions and 536 deletions
|
@ -6,19 +6,37 @@ $(document).ready(function() {
|
|||
});
|
||||
$(document.getElementById($(this).attr("for"))).prop('checked', true);
|
||||
if($('#q').val()) {
|
||||
if (getHttpRequest() == "GET") {
|
||||
$('#search_form').attr('action', $('#search_form').serialize());
|
||||
}
|
||||
$('#search_form').submit();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$('#time-range').change(function(e) {
|
||||
if($('#q').val()) {
|
||||
if (getHttpRequest() == "GET") {
|
||||
$('#search_form').attr('action', $('#search_form').serialize());
|
||||
}
|
||||
$('#search_form').submit();
|
||||
}
|
||||
});
|
||||
$('#language').change(function(e) {
|
||||
if($('#q').val()) {
|
||||
if (getHttpRequest() == "GET") {
|
||||
$('#search_form').attr('action', $('#search_form').serialize());
|
||||
}
|
||||
$('#search_form').submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function getHttpRequest() {
|
||||
httpRequest = "POST";
|
||||
urlParams = new URLSearchParams(window.location.search);
|
||||
if (urlParams.has('method')) {
|
||||
httpRequest = urlParams.get('method');
|
||||
}
|
||||
return httpRequest;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue