makew0rld / amfora

A fancy terminal browser for the Gemini protocol.
GNU General Public License v3.0
1.14k stars 68 forks source link

feature request: add confirmation promps when visiting non-gemini URLs #301

Closed emily-is-my-username closed 2 years ago

emily-is-my-username commented 2 years ago

Hi! When using amfora, I keep accidentally opening browser windows by selecting http(s) urls that are not clearly marked as such. I looked for a ways to verify non-gemini URLs before visiting them, but none of the options I found were really convenient for me:

IMO, a (y/n) confirmation prompt (similar to redirects) on visiting URLs with a configurable set of schemes would be a good tradeoff between visual clutter, control and convenience.

EDIT: Sorry, I just noticed that the underline option exists to mark non-gemini-URLs. I will still leave this open in case it is wanted. I personally like being able to quickly review the URL before opening it.

makew0rld commented 2 years ago

Hi, thanks for your interest in Amfora.

Personally I differentiate between HTTP and Gemini URLs using themeing. Here's an example just on the new tab page of my Amfora setup:

image

This theme used to be the Amfora default before v1.9.0. Copied from the release notes:

The default theme of Amfora was changed, now the user's default terminal colors are used. See #181 for details. If you want the original Amfora theme back, copy this file into your config, replacing the [theme] section.

Using different colours is very clear to me and does the job. Thanks for adding a PR, and I think the idea of scheme-based prompts is not bad. But if your issue is "accidentally opening browser windows by selecting http(s) urls", maybe it's unnecessary and themeing is a good enough fix? Let me know what you think.

emily-is-my-username commented 2 years ago

Personally I differentiate between HTTP and Gemini URLs using themeing.

Thank you for the reminder. That was another oversight on my part, I guess I subconsciously assumed those were already-visited URLs (even though I know amfora does not track those) without thinking twice about it.

Thanks for adding a PR, and I think the idea of scheme-based prompts is not bad. But if your issue is "accidentally opening browser windows by selecting http(s) urls", maybe it's unnecessary and themeing is a good enough fix? Let me know what you think.

Themeing is a good enough fix for my initial issue. That being said, I still find the prompts useful to inspect external urls and as a safeguard when mistyping link numbers. They will stay in my own build, but I can't judge know how high the demand for them really is.

makew0rld commented 2 years ago

Good to hear themeing works for you. I'll revisit your PR before the next release if not earlier and decide whether to merge it in or not. Thanks for working on it!