Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] do not use category select js if there is no search query field on the page

Adam Tauberf79f6713b0ce
diff --git a/searx/static/js/search_on_category_select.js b/searx/static/js/search_on_category_select.js
index 6156ca4e8..990211690 100644
--- a/searx/static/js/search_on_category_select.js
+++ b/searx/static/js/search_on_category_select.js
@@ -1,5 +1,5 @@
$(document).ready(function() {
- if($('#q')) {
+ if($('#q').length) {
$('#categories label').click(function(e) {
$('#categories input[type="checkbox"]').each(function(i, checkbox) {
$(checkbox).prop('checked', false);