nt1m / vivaldi-fox

An add-on that aims to add Vivaldi style toolbar colouring to the Firefox UI
https://addons.mozilla.org/en-US/firefox/addon/vivaldifox/
201 stars 21 forks source link

Make access all web page content permission optional #125

Closed 7ritn closed 1 year ago

7ritn commented 2 years ago

This pull request makes the permission optional. This implements the issue #124

nt1m commented 2 years ago

all_urls is used to get the websites theme_colors meta tags, which corresponds to this setting: "Use colors defined by the web page when available", which is enabled by default.

This PR means that by default, that setting would not work. Also, I think this would need a landing page with a button that calls browser.permissions.request(), explaining why the permission is needed, otherwise the optional permission is never granted.

7ritn commented 2 years ago

Yeah I can try implementing this. Will take a bit of time, because I'm currently in my exam phase at uni.

7ritn commented 2 years ago

So I added a welcome page shown once after installation: image

This will ask for the permission. If the user doesn't give the permission the default values will be used (which need to work without the permission).

I also added the feature, that the plugins requests the optional permission if switched to a settings option requiring it. This is happening for the UsePageDefinedColors option and the Color Sources page-top and page-top-accent.

7ritn commented 2 years ago

I think it would be a good idea to merge the two webpages (settings and welcome page) into one folder, something like ui or skin, the css file I used is an exact copy of the settings one, so that one can be shared.

7ritn commented 1 year ago

Hey, this is a small reminder. I'd love to get this pushed :)

7ritn commented 1 year ago

Yes this would need more polish. I barely have any experience with JavaScript, but I can try to create a landing page after install asking for the all_urls permission.

-------- Original Message -------- On 3 Jun 2022, 15:20, Tim Nguyen wrote:

all_urls is used to get the websites theme_colors meta tags, which corresponds to this setting: "Use colors defined by the web page when available", which is enabled by default.

This PR means that by default, that setting would not work. Also, I think this would need a landing page with a button that calls browser.permissions.request(), explaining why the permission is needed, otherwise the optional permission is never granted.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

7ritn commented 1 year ago

Hi, this is still pending. If I don't get a reply soon, I'm going to submit my fork to Mozilla as a new extension, so people can use this wonderful extension without having to give out the permission.

nt1m commented 1 year ago

I apologize for the lack of reply, I've been very busy in the last months and I've been unable to test this extension (my main computer dev environment for extensions is completely broken). Will get to it ASAP.

nt1m commented 1 year ago

Update: I should be able to merge this sometime today. I managed to fix my web-ext environment locally (after one hour!). There are a few changes I want to make before merging, but I'll take care of them.

Thanks for your work!

nt1m commented 1 year ago

@7ritn Sorry it took me a lot of time, the last 3 months have been particularly busy for me, but next version should have your changes.

nt1m commented 1 year ago

Thanks again!

7ritn commented 1 year ago

Thanks so much!