summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/oscar/base.html1
-rw-r--r--searx/templates/oscar/preferences.html11
-rw-r--r--searx/templates/simple/base.html2
-rw-r--r--searx/templates/simple/preferences.html12
4 files changed, 25 insertions, 1 deletions
diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html
index de7d05bf6..dbc0699df 100644
--- a/searx/templates/oscar/base.html
+++ b/searx/templates/oscar/base.html
@@ -100,6 +100,7 @@
<script src="{{ url_for('static', filename='js/searxng.min.js') }}"
data-method="{{ method or 'POST' }}"
data-autocompleter="{% if autocomplete %}true{% else %}false{% endif %}"
+ data-infinite-scroll="{% if infinite_scroll %}true{% else %}false{% endif %}"
data-translations="{{ translations }}"></script>
{% for script in scripts %}
{{""}}<script src="{{ url_for('static', filename=script) }}"></script>
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html
index 71ee57a62..1a5219b07 100644
--- a/searx/templates/oscar/preferences.html
+++ b/searx/templates/oscar/preferences.html
@@ -248,6 +248,17 @@
{{ preferences_item_footer(info, label, rtl) }}
{% endif %}
+ {% if 'infinite_scroll' not in locked_preferences %}
+ {% set label = _('Infinite scroll') %}
+ {% set info = _('Automatically load next page when scrolling to bottom of current page') %}
+ {{ preferences_item_header(info, label, rtl, 'infinite_scroll') }}
+ <select class="form-control {{ custom_select_class(rtl) }}" name="infinite_scroll" id="infinite_scroll">
+ <option value="1" {% if infinite_scroll %}selected="selected"{% endif %}>{{ _('On') }}</option>
+ <option value="0" {% if not infinite_scroll %}selected="selected"{% endif %}>{{ _('Off')}}</option>
+ </select>
+ {{ preferences_item_footer(info, label, rtl) }}
+ {% endif %}
+
{{ plugin_of_category('ui' )}}
</div>
</fieldset>
diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html
index ffd648171..644c6df9a 100644
--- a/searx/templates/simple/base.html
+++ b/searx/templates/simple/base.html
@@ -23,7 +23,7 @@
data-method="{{ method or 'POST' }}"
data-autocompleter="{% if autocomplete %}true{% else %}false{% endif %}"
data-search-on-category-select="{{ 'true' if 'plugins/js/search_on_category_select.js' in scripts else 'false'}}"
- data-infinite-scroll="{{ 'true' if 'plugins/js/infinite_scroll.js' in scripts else 'false' }}"
+ data-infinite-scroll="{% if infinite_scroll %}true{% else %}false{% endif %}"
data-hotkeys="{{ 'true' if 'plugins/js/vim_hotkeys.js' in scripts else 'false' }}"
data-static-path="{{ url_for('static', filename='themes/simple') }}/"
data-translations="{{ translations }}"></script>
diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html
index b47cbc774..275a53bf7 100644
--- a/searx/templates/simple/preferences.html
+++ b/searx/templates/simple/preferences.html
@@ -226,6 +226,18 @@
<div class="description">{{_('Open result links on new browser tabs') }}</div>
</fieldset>
{% endif %}
+ {% if 'infinite_scroll' not in locked_preferences %}
+ <fieldset>
+ <legend>{{ _('Infinite scroll') }}</legend>
+ <p class="value">
+ <select name='infinite_scroll'>
+ <option value="1" {% if infinite_scroll %}selected="selected"{% endif %}>{{ _('On') }}</option>
+ <option value="0" {% if not infinite_scroll %}selected="selected"{% endif %}>{{ _('Off')}}</option>
+ </select>
+ </p>
+ <div class="description">{{ _('Automatically load next page when scrolling to bottom of current page') }}</div>
+ </fieldset>
+ {% endif %}
{{ plugin_preferences('ui') }}
{{ tab_footer() }}