From 0d4d58f794fea3a4439f4ed4689e52b8031e5246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Deparis?= Date: Sun, 6 Jan 2019 18:38:51 +0100 Subject: [PATCH 1/3] [enh] Add preference section to two upstream plugins for simple theme integration --- searx/plugins/open_results_on_new_tab.py | 1 + searx/plugins/vim_hotkeys.py | 1 + 2 files changed, 2 insertions(+) diff --git a/searx/plugins/open_results_on_new_tab.py b/searx/plugins/open_results_on_new_tab.py index ae27ea27..0f06f5a5 100644 --- a/searx/plugins/open_results_on_new_tab.py +++ b/searx/plugins/open_results_on_new_tab.py @@ -20,5 +20,6 @@ description = gettext('Results are opened in the same window by default. ' 'This plugin overwrites the default behaviour to open links on new tabs/windows. ' '(JavaScript required)') default_on = False +preference_section = 'ui' js_dependencies = ('plugins/js/open_results_on_new_tab.js',) diff --git a/searx/plugins/vim_hotkeys.py b/searx/plugins/vim_hotkeys.py index 8f06f134..47b830c7 100644 --- a/searx/plugins/vim_hotkeys.py +++ b/searx/plugins/vim_hotkeys.py @@ -5,6 +5,7 @@ description = gettext('Navigate search results with Vim-like hotkeys ' '(JavaScript required). ' 'Press "h" key on main or result page to get help.') default_on = False +preference_section = 'ui' js_dependencies = ('plugins/js/vim_hotkeys.js',) css_dependencies = ('plugins/css/vim_hotkeys.css',) From 21beb64a725abbd140a4f983a7a42ebea1083f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Deparis?= Date: Mon, 7 Jan 2019 10:22:48 +0100 Subject: [PATCH 2/3] Remove forgotten white spaces in templates/simple/preferences.html --- searx/templates/simple/preferences.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html index 049af5e3..dbc3317e 100644 --- a/searx/templates/simple/preferences.html +++ b/searx/templates/simple/preferences.html @@ -171,7 +171,7 @@ {{ _('With that list, you can assess searx transparency.') }}

- {% if cookies %} + {% if cookies %} @@ -186,14 +186,14 @@
{{ _('Cookie name') }}
{% else %} {% include 'oscar/messages/no_cookies.html' %} - {% endif %} + {% endif %}

{{ _('Search URL of the currently saved preferences') }} :

{{ url_for('index', _external=True) }}?preferences={{ preferences_url_params|e }}{% raw %}&q=%s{% endraw %}

{{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }}

- + {{ tab_footer() }} {{ tab_header('maintab', 'privacy', _('Privacy')) }} @@ -218,7 +218,7 @@
{{ _('Proxying image results through searx') }}
{{ plugin_preferences('privacy') }} - + {{ tab_footer() }} {{ tabs_close() }} @@ -226,7 +226,7 @@

{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
{{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }} -

+

From 89deb4fbcc2e45baa2d949a453a79b24b8600416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Deparis?= Date: Mon, 7 Jan 2019 10:25:02 +0100 Subject: [PATCH 3/3] [fix] Remove markup errors in simple template preferences file --- searx/templates/simple/preferences.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html index dbc3317e..7437ed42 100644 --- a/searx/templates/simple/preferences.html +++ b/searx/templates/simple/preferences.html @@ -68,7 +68,7 @@

-
{{ _('Filter content') }}

+

{{ _('Filter content') }}

{{ plugin_preferences('general') }}
@@ -122,7 +122,7 @@ {% endif %} {% endfor %} -
+
{{ tab_footer() }} {% endfor %} {{ tabs_close() }}