summaryrefslogtreecommitdiff
path: root/searx/templates/oscar
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2020-10-26 14:20:58 +0100
committerGitHub <noreply@github.com>2020-10-26 14:20:58 +0100
commitdb703a0283ee169381aeea97c678e666ae508348 (patch)
tree6b992653be4ab7905f2b7bf27d98d64cb15570fe /searx/templates/oscar
parent2aef38c3b9d1fe93e9d665a49b10151d63d92392 (diff)
parent32957cdf49c306a5f50ca78bb50c0978ffe5c072 (diff)
Merge pull request #565 from MarcAbonce/onions
New category: Onions
Diffstat (limited to 'searx/templates/oscar')
-rw-r--r--searx/templates/oscar/macros.html12
-rw-r--r--searx/templates/oscar/preferences.html2
2 files changed, 12 insertions, 2 deletions
diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html
index f52d9713c..57a90aaa2 100644
--- a/searx/templates/oscar/macros.html
+++ b/searx/templates/oscar/macros.html
@@ -32,7 +32,11 @@
<span class="label label-default">{{ engine }}</span>
{%- endfor -%}
{%- if result.url -%}
- <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
+ {% if result.cached_url %}
+ <small>{{ result_link(result.cached_url, icon('link') + _('cached'), "text-info", id) }}</small>
+ {% elif not result.is_onion %}
+ <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
+ {% endif %}
{%- endif -%}
{%- if proxify -%}
<small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
@@ -50,7 +54,11 @@
<span class="label label-default">{{ engine }}</span>
{%- endfor %}
{%- if result.url -%}
- <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
+ {% if result.cached_url %}
+ <small>{{ result_link(result.cached_url, icon('link') + _('cached'), "text-info", id) }}</small>
+ {% elif not result.is_onion %}
+ <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
+ {% endif %}
{%- endif -%}
{% if proxify -%}
<small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html
index b1023a02b..b596f66d8 100644
--- a/searx/templates/oscar/preferences.html
+++ b/searx/templates/oscar/preferences.html
@@ -258,6 +258,7 @@
<fieldset>
<div class="container-fluid">
{% for plugin in plugins %}
+ {% if plugin.preference_section != 'onions' %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{{ _(plugin.name) }}</h3>
@@ -271,6 +272,7 @@
</div>
</div>
</div>
+ {% endif %}
{% endfor %}
</div>
</fieldset>