libredirect / browser_extension

A browser extension that redirects popular sites to alternative privacy friendly frontends
https://libredirect.github.io
GNU General Public License v3.0
3.28k stars 121 forks source link

Add "Redirect (frontend) to Prefferred" by a new implementation #767

Closed Victor239 closed 1 year ago

Victor239 commented 1 year ago

I've got bookmarks for webpages on Teddit instances, as well as RSS feeds from various instances also. Often when I visit these webpages now I find the content doesn't load due to a 429 error e.g. https://teddit.zaggy.nl/r/AskReddit.

I've now switched over to using localhost instance type for Teddit, so it would be helpful if there was a button to Redirect to localhost when visiting a public instance site, if the localhost option is enabled. Right now I have to delete the domain name, type reddit.com and have to redirect to the localhost site.

IkelAtomig commented 1 year ago

You mean redirect and Redirect to localhost should co-exist in the popup menu ?

Victor239 commented 1 year ago

Redirect to Original and Redirect to localhost, yes.

IkelAtomig commented 1 year ago

Got it.

ManeraKai commented 1 year ago

The solution to that should be this: https://libredirect.github.io/docs.html#preferred_instance. It's already there in Teddit by this small [R↗] button. Though the button isn't there for a subreddit link, just for a post or a comment's link.

Victor239 commented 1 year ago

@ManeraKai that doesn't work on Teddit when there's a 429 error. It's why I made this feature request. See below:

image

ManeraKai commented 1 year ago

I understand but the solution should be on Teddit's side. There's a possibility of implementing a button that trusts the user that that link is a teddit instance etc.

Victor239 commented 1 year ago

Unfortunately Teddit is no longer actively maintained so this is not possible.

Other than Teddit there also other frontends (or particular instances) I've found sometimes don't load the pages correctly. I believe this is why frontends_manager was even created, to encourage users to instead utilise their own frontend for increased reliability?

To make it easier to migrate from public instances to localhost versions of websites it would therefore be very useful to have this shortcut, as right now my workflow is: 1) Visit public instance Teddit post (from bookmark/saved link/RSS), find that it has a 429 error 2) Copy the URL 3) Open a new tab 4) Paste the URL 5) Delete the domain name segment 6) Enter the domain name as reddit.com 7) Submit and be redirected to localhost version

As you might imagine, this is quite tedious. It's also the kind of feature that would be useful across every type of frontend, and for encouraging frontends_manager usage in general, so I believe it should be integrated into LibRedirect itself and not be a frontend-specific feature.

ManeraKai commented 1 year ago

This feature seems simple but it requires either:

  1. knowing all teddit instances on the internet.
  2. Sending an http request to the current website in tab to see if it's teddit or not (I do that with FediRedirect), though this is bad for privacy if you were dumb and opened the popup on every website.
  3. Have Redirect Teddit to localhost, Redirect Invidious to localhost, Redirect Teddit to Original, Redirect Invidious to Original and to all frontends in the popup and "trust" the user into saying what website it is (this may cause errors if the user was dumb and pressed the wrong frontend).
Victor239 commented 1 year ago

If I visit e.g. https://teddit.net/r/pics/comments/15frx1u/a_stained_glass_transom_i_made/ then when I open the pop-up it looks like LibRedirect already knows I'm on a Teddit instance as it shows the toggle for Reddit at the top.

I presume that it does this by checking the current webpage URL against the list of known public instances that LibRedirect already has access to. So is this data not already available for usage? This way a universal button for Redirect to localhost can be used.

ManeraKai commented 1 year ago

No LibRedirect is thinking that that URL is a reddit.com url xD

Victor239 commented 1 year ago

Ah, I don't quite understand how that works then in relation to the 3 approaches you suggested.

I would have said my preferred approach is what I said there: "checking the current webpage URL against the list of known public instances that LibRedirect already has access to". Not sure if that's possible or not.

Failing that, approach 2 is better than not having a workaround, as long as this feature can be toggled off/on.

ManeraKai commented 1 year ago

image