diff --git a/app/filter.py b/app/filter.py index bc778a5..3f5ec0b 100644 --- a/app/filter.py +++ b/app/filter.py @@ -386,10 +386,13 @@ class Filter: # Strip unneeded arguments link['href'] = filter_link_args(q) - # Add no-js option + # Add alternate viewing options for results if self.config.nojs: append_nojs(link) + if self.config.anon_view: + append_anon_view(link) + if self.config.new_tab: link['target'] = '_blank' else: diff --git a/app/models/config.py b/app/models/config.py index 2bb96ea..7754df1 100644 --- a/app/models/config.py +++ b/app/models/config.py @@ -28,6 +28,7 @@ class Config: self.new_tab = read_config_bool('WHOOGLE_CONFIG_NEW_TAB') self.view_image = read_config_bool('WHOOGLE_CONFIG_VIEW_IMAGE') self.get_only = read_config_bool('WHOOGLE_CONFIG_GET_ONLY') + self.anon_view = read_config_bool('WHOOGLE_CONFIG_ANON_VIEW') self.accept_language = False self.safe_keys = [ @@ -39,7 +40,9 @@ class Config: 'new_tab', 'view_image', 'block', - 'safe' + 'safe', + 'nojs', + 'anon_view' ] # Skip setting custom config if there isn't one diff --git a/app/static/settings/translations.json b/app/static/settings/translations.json index 4615e3a..cc020d6 100644 --- a/app/static/settings/translations.json +++ b/app/static/settings/translations.json @@ -15,6 +15,7 @@ "config-block-url-help": "Use regex", "config-theme": "Theme", "config-nojs": "Show NoJS Links", + "config-anon-view": "Show \"Anonymous View\" Links", "config-dark": "Dark Mode", "config-safe": "Safe Search", "config-alts": "Replace Social Media Links", diff --git a/app/templates/index.html b/app/templates/index.html index 7db70e9..10f6b6f 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -148,6 +148,10 @@ +