feat: create a local "per tab" scope for the extension
nvxos opened this issue · comments
Hey, love the extension!
I noticed it affects all the tabs of the browser and since I often have some background videos or streams playing in other tabs on my other monitors I don't want the extension to affect them too.
Most playback speed or volume control extensions only affects the tab in focus when using the extension, Dark Reader also has some kind of global + local toggling system (even though for the local scope for this one it's on a "per website" basis, but kinda the same idea).
In terms of the implementation I guess something like Dark Reader might be good, with a global toggle like what we have right now, and an additional toggle for the tab in focus? There's still some details to think about like the default state of the tab toggle (I guess always on when the global one is on?) and if some kind of "last state memory" would be good (maybe based on the url? Not sure).
And so if this gets implemented, it would probably be nice to also have this kind of global/local scope separation for settings too? Again, kind of how Dark Reader does it.
Hey, thanks!
I agree, this should be an option.
There was a little chat on Discord about this. Also I think I have a TODO written somewhere in the code about this. My initial idea is to clone the settings object upon initialization and only make changes to the copy of the object, not the global object.