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.29k stars 123 forks source link

Add Page Action Setting (icon in URL bar) #931

Closed KaceCottam closed 4 months ago

KaceCottam commented 6 months ago

Adds a setting in the general options to enable the icon in the URL bar that brings up the same popup as the extension button.

This is a very simple version that enables the button on every page, but we can tune it to only show this icon on libredirect-compatible pages. We can also edit the wording, it is not very user friendly-- but I wonder how we should name something like this.

image image image

KaceCottam commented 6 months ago

Still have to:

IkelAtomig commented 5 months ago

It is a good idea, we could merge it, without even looking on it for the third task, I think it unnecessary because, we have preferred instance option which works irrespective of the site or instance you have selected.

It is something to think about.

KaceCottam commented 5 months ago

The third task is there because at the moment, that icon will even show up on any page even if it is not relevant. Websites like AirBNB, flight trackers, online shopping, etc. will have the icon, but it doesn't make sense for it to be there contextually.

IkelAtomig commented 5 months ago

Okay, What about a situation where you receive a instance link being shared which is not in the list.

How do you know when to show it by reading the contents of the page ?

ManeraKai commented 5 months ago

I think the reason I didn't implement this was that url bar icons got removed in manifest v3.

IkelAtomig commented 5 months ago

I don't think so. Then how would Multi Account Containers would be still then. Stuck on Mv2 ?

KaceCottam commented 5 months ago

https://developer.chrome.com/docs/extensions/mv2/reference/pageAction Availability ≤ MV2

Ah, didn't realize that would be the case with manifest-v3. I wonder if Firefox will follow-suit. In any case, this kind of addition might be best for a personal fork ( in the case that I am staying on my current version of firefox :P )

I also wanted to answer:

What about a situation where you receive a instance link being shared which is not in the list

In these situations, I was going to look at the code for the popup--how we determine to the top items in image and image

If we can figure it out in the popup, there must be a way to say "are we in a libredirect-compatible page that is in the list" and hide the pageAction.

IkelAtomig commented 5 months ago

I mean how do you figure it out ?

Currently pageAction is done by the URL not the page's contents

ManeraKai commented 4 months ago

Ah, didn't realize that would be the case with manifest-v3. I wonder if Firefox will follow-suit. In any case, this kind of addition might be best for a personal fork ( in the case that I am staying on my current version of firefox :P )

I'll close it for this reason.