dpacassi / disable-javascript

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

Inverted logic is consistent #96

Open 7v0lk0v opened 2 years ago

7v0lk0v commented 2 years ago

If Default state is JS on and you then mark some specific sites as off, toggling the default state to JS off seems to then treat all those specific sites as on now instead of keeping them (correctly) off.

To clarify: if I want to disable JS on specific SiteA then it should remain disabled no matter what the default global policy is for this plugin.

I suspect these settings are stored/applied as a toggle instead of as the actual desired state.

rillig commented 2 years ago

I agree that the current behavior is hard to understand, even for experienced software developers. Intuitively, I expect the "Domain list" to have another column named "State" showing either a checkmark or a cross.

The current code indeed only checks whether a host is listed. Later on, the code compares that to the default setting.