diff options
Diffstat (limited to 'searx')
-rw-r--r-- | searx/settings.yml | 2 | ||||
-rw-r--r-- | searx/settings_defaults.py | 1 | ||||
-rw-r--r-- | searx/templates/simple/macros.html | 2 | ||||
-rwxr-xr-x | searx/webapp.py | 1 |
4 files changed, 5 insertions, 1 deletions
diff --git a/searx/settings.yml b/searx/settings.yml index 5587ed51a..96ebd9715 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -95,6 +95,8 @@ ui: default_theme: simple # center the results ? center_alignment: false + # URL prefix of the internet archive, don't forgett trailing slash (if needed). + # cache_url: "https://webcache.googleusercontent.com/search?q=cache:" # Default interface locale - leave blank to detect from browser information or # use codes from the 'locales' config section default_locale: "" diff --git a/searx/settings_defaults.py b/searx/settings_defaults.py index 4e06fb023..330878c1f 100644 --- a/searx/settings_defaults.py +++ b/searx/settings_defaults.py @@ -190,6 +190,7 @@ SCHEMA = { 'advanced_search': SettingsValue(bool, False), 'query_in_title': SettingsValue(bool, False), 'infinite_scroll': SettingsValue(bool, False), + 'cache_url': SettingsValue(str, 'https://web.archive.org/web/'), }, 'preferences': { 'lock': SettingsValue(list, []), diff --git a/searx/templates/simple/macros.html b/searx/templates/simple/macros.html index e06157867..d9af3fbbb 100644 --- a/searx/templates/simple/macros.html +++ b/searx/templates/simple/macros.html @@ -42,7 +42,7 @@ {%- macro result_sub_footer(result, proxify) -%} <div class="engines"> {% for engine in result.engines %}<span>{{ engine }}</span>{% endfor %} - {{ result_link("https://web.archive.org/web/" + result.url, icon_small('ellipsis-vertical-outline') + _('cached'), "cache_link") }}‎ {% if proxify and proxify_results %} {{ result_link(proxify(result.url), icon('link') + _('proxied'), "proxyfied_link") }} {% endif %} + {{ result_link(cache_url + result.url, icon_small('ellipsis-vertical-outline') + _('cached'), "cache_link") }}‎ {% if proxify and proxify_results %} {{ result_link(proxify(result.url), icon('link') + _('proxied'), "proxyfied_link") }} {% endif %} </div>{{- '' -}} <div class="break"></div>{{- '' -}} {%- endmacro -%} diff --git a/searx/webapp.py b/searx/webapp.py index 8c2046b5c..369b2d2db 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -464,6 +464,7 @@ def render(template_name: str, **kwargs): kwargs['image_proxify'] = image_proxify kwargs['proxify'] = morty_proxify if settings['result_proxy']['url'] is not None else None kwargs['proxify_results'] = settings['result_proxy']['proxify_results'] + kwargs['cache_url'] = settings['ui']['cache_url'] kwargs['get_result_template'] = get_result_template kwargs['opensearch_url'] = ( url_for('opensearch') |