dpacassi / disable-javascript

Adds the ability to disable JavaScript on specific sites.
MIT License
272 stars 33 forks source link

Track whether exception domains are blocked vs allowed #70

Open heatherbooker opened 4 years ago

heatherbooker commented 4 years ago

This adds a flag "block" or "allow" to each domain added to the list of exceptions.

This was brought up in issues #22 and #69.

It's the simplest implementation I think. I didn't test a ton, just a bit locally on my own system using Firefox 75.0 on Fedora 31. Hopefully helps someone to see it, even if you don't want it in the addon officially! :)

Looks like: Screenshot of exception domains in options

heatherbooker commented 4 years ago

Ooh I just realized this needs some kind of migration plan for current users. So this isn't quite ready yet ;D

dpacassi commented 4 years ago

Yup, that's right, a migration is needed. So far only one migration has taken place, check https://github.com/dpacassi/disable-javascript/blob/master/background/background.js#L330 for details. (The browser.storage.local.remove(''); part is only run when updating the web extension from version 1.x.x to 2.x.x).

I didn't start the work on it yet as I planned to rework the backend/storage anyway. Check #22 and #18 for details.