vrillusions / permit-cookies

Firefox extension that quickly lets you adjust the cookie permissions for a site.
https://addons.mozilla.org/en-US/firefox/addon/permit-cookies-2/
Other
7 stars 4 forks source link

Switch to use webextensions to work with recent versions of firefox #26

Open vrillusions opened 8 years ago

vrillusions commented 8 years ago

See https://blog.mozilla.org/addons/2015/08/21/the-future-of-developing-firefox-add-ons/ but Mozilla is planning on deprecating add-ons within the next year or two. Restartless would be really nice. The add-on is pretty basic so it shouldn't take too long but it would be a big undertaking.

Plan is to implement this as "clean room" like as possible given I've already seen the code but I'm still not familiar with it. So toss out everything and start from scratch

vrillusions commented 7 years ago

For an example of what might be possible if I do just go and convert existing one take a look at https://addons.mozilla.org/en-US/firefox/addon/live-http-headers-clone/ which did just that (look at the release history to find original one)

vrillusions commented 7 years ago

So looking at the Comparison of WebExtension API with XUL Overlay and we need access to nsiPermissionManager. As of now (end of 2016) that isn't implemented. Looking at the Add-On SDK that has a big scary warning on the top saying not to use it. Plus I don't think it supports nsiPermissionManager (or an equivalent) either.

To use WebExtensions we need access to the ContentSettings api. Looking at http://arewewebextensionsyet.com/#contentSettings (site no longer exists), which I think is a mozilla thing, there's nothing for ContentSettings yet so no clue when that will be added. According to trello board it's not going to happen. Which means moving this from XUL is not going to happen. Don't see any other way to do what this needs. Maybe it will get implemented eventually. Till then not going to bother migrating this to a different SDK which is going to be deprecated.

(edit) Forgot to mention I recall seeing somewhere that Mozilla is willing to work with add on devs so any missing api's can be implemented, just need to find the time to get in contact with them to see if they can at least move that API from "not going to happen" since it seems like that is used by more than just this extension.

(edit 2) Found a bug report, a lot easier to add a "me to" to that: https://bugzilla.mozilla.org/show_bug.cgi?id=1291841

vrillusions commented 4 years ago

as an update in recent versions of firefox it's slightly more usable:

And I've checked that ticket above and it's still open with a last update of a year ago so not sure what the holdup is there.