You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Case On the /search page - Changed the date_range from 'anytime' to 'last day'. I have checked my browsers settings and javascript is enabled for all sites.
Expectation: On Change Event: in the time_range: expectation is that the query would get automatically re-submitted with that time range. - that is not happening.
Problem: I located the code (see below) that is "supposed" to auto-re-submit the query, but it is not working. If the query is manually re-submitted it works OK at that point.
QUESTION: Why is this not working?
/usr/local/searxng/searxng-src/searx/static/themes/simple/src/js/main/search.js
excerpt:
// Additionally to searching when selecting a new category, we also
// automatically start a new search request when the user changes a search
// filter (safesearch, time range or language) (this requires JavaScript
// though)
if ( qinput !== null
&& searxng.settings.search_on_category_select
// If .search_filters is undefined (invisible) we are on the homepage and
// hence don't have to set any listeners
&& d.querySelector(".search_filters") != null
)
{
searxng.on(d.getElementById('time_range'), 'change', submitIfQuery);
searxng.on(d.getElementById('safesearch'), 'change', submitIfQuery);
searxng.on(d.getElementById('language'), 'change', submitIfQuery);
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Case On the /search page - Changed the date_range from 'anytime' to 'last day'. I have checked my browsers settings and javascript is enabled for all sites.
Expectation: On Change Event: in the time_range: expectation is that the query would get automatically re-submitted with that time range. - that is not happening.
Problem: I located the code (see below) that is "supposed" to auto-re-submit the query, but it is not working. If the query is manually re-submitted it works OK at that point.
QUESTION: Why is this not working?
/usr/local/searxng/searxng-src/searx/static/themes/simple/src/js/main/search.js
excerpt:
// Additionally to searching when selecting a new category, we also
// automatically start a new search request when the user changes a search
// filter (safesearch, time range or language) (this requires JavaScript
// though)
if ( qinput !== null
&& searxng.settings.search_on_category_select
// If .search_filters is undefined (invisible) we are on the homepage and
// hence don't have to set any listeners
&& d.querySelector(".search_filters") != null
)
{
searxng.on(d.getElementById('time_range'), 'change', submitIfQuery);
searxng.on(d.getElementById('safesearch'), 'change', submitIfQuery);
searxng.on(d.getElementById('language'), 'change', submitIfQuery);
}
Beta Was this translation helpful? Give feedback.
All reactions