raicem/impulse-blocker

Extension forgets enable/disable state on browser restart

Crote opened this issue · 4 comments

Crote commented

Easy to reproduce:

  1. Set the addon to 'off' in the button popup
  2. Restart your browser
  3. Check the addon status. It should still be off, but it is reset to on.

Not really a big deal on desktop, but it's pretty annoying on mobile as Firefox also gets stopped when memory is low: when you switch back (and FF restarts), your tabs won't load as expected because the blocker has re-enabled itself. Especially annoying because there's no way to recover the url you were trying to visit.

This should be fixable by simply adding the addon state to the settings storage.

prail commented

I actually like this functionality as I don't have to worry about forgetting to turn the add-on back on after I've turned it off.

Yeah I was looking at this issue this weekend. Thought the same thing. Maybe this is a feature? I don't know.

Crote commented

The reason I filed this as a bug is mainly for mobile users, as switching to a different app and then switching back to Firefox can cause a restart, which means that all tabs are reloaded. #16 already makes this a lot less painful, as you could just disable the addon once and then click the links on the block page to load them.

A "normal" restart which doesn't reload tabs should indeed probably re-enable the addon. This nicely ties in with #10: you probably want some form of automatic re-enabling, but when to block and why? Keeping it on all the time is annoying, keeping it off al the time is obviously useless.

Since now we have ability to pause the extension, I implement this issue. Extension now remembers last on/off state.