mirror of https://github.com/searx/searx
Add tag_privacy_violator setting and add it to preferences.py
This commit is contained in:
parent
d8fdfcc7b3
commit
6a5bb59099
|
@ -389,6 +389,16 @@ class Preferences:
|
|||
'2': 2
|
||||
}
|
||||
),
|
||||
'tag_privacy_violators': MapSetting(
|
||||
settings['search'].get('tag_privacy_violators',False),
|
||||
is_locked('tag_privacy_violators'),
|
||||
map={
|
||||
'0': False,
|
||||
'1': True,
|
||||
'False': False,
|
||||
'True': True
|
||||
}
|
||||
),
|
||||
'theme': EnumStringSetting(
|
||||
settings['ui'].get('default_theme', 'oscar'),
|
||||
is_locked('theme'),
|
||||
|
@ -413,6 +423,7 @@ class Preferences:
|
|||
settings['ui'].get('theme_args', {}).get('oscar_style', 'logicodev'),
|
||||
is_locked('oscar-style'),
|
||||
choices=['', 'logicodev', 'logicodev-dark', 'pointhi']),
|
||||
''
|
||||
'advanced_search': MapSetting(
|
||||
settings['ui'].get('advanced_search', False),
|
||||
is_locked('advanced_search'),
|
||||
|
|
|
@ -20,6 +20,7 @@ search:
|
|||
ban_time_on_fail : 5 # ban time in seconds after engine errors
|
||||
max_ban_time_on_fail : 120 # max ban time in seconds after engine errors
|
||||
prefer_configured_language: False # increase weight of results in confiugred language in ranking
|
||||
tag_privacy_violators: False # tag privacy violators, disabled by default.
|
||||
|
||||
server:
|
||||
port : 8888
|
||||
|
|
|
@ -150,6 +150,17 @@
|
|||
{{ preferences_item_footer(info, label, rtl) }}
|
||||
{% endif %}
|
||||
|
||||
{% if 'tag_privacy_violators' not in locked_preferences %}
|
||||
{% set label = _('Tag privacy violators') %}
|
||||
{% set info = _('Tag websites that are behind Cloudflare and other privacy violators') %}
|
||||
{{ preferences_item_header(info, label, rtl, 'tag_privacy_violators') }}
|
||||
<select class="form-control {{ custom_select_class(rtl) }}" name="tag_privacy_violators" id="tag_privacy_violators">
|
||||
<option value="1" {% if tag_privacy_violators %}selected="selected"{% endif %}>{{ _('On') }}</option>
|
||||
<option value="0" {% if not tag_privacy_violators %}selected="selected"{% endif %}>{{ _('Off')}}</option>
|
||||
</select>
|
||||
{{ preferences_item_footer(info, label, rtl) }}
|
||||
{% endif %}
|
||||
|
||||
{% if 'autofocus' not in locked_preferences %}
|
||||
{% set label = _('Autofocus search field') %}
|
||||
{% set info = _('Turn off if you use your keyboard to scroll') %}
|
||||
|
|
Loading…
Reference in New Issue