Closed duhrer closed 7 months ago
When we work on #103, we should make the startup behaviour configurable, and have the startup check read the stored preference before deciding whether to open the options window.
I was able to make this configurable via stored preferences.
This will evolve as #103 is worked on, but the core of the idea is already merged and will be part of the upcoming 1.0 release.
The larger theme for the upcoming release is ensuring the user keeps control as much as possible.
As part of this I wondered whether we had any way to ensure that a controllable window is open and focused when the browser starts. Currently, I believe the default behaviour is to open a new window with the
chrome://
prefix, which means that it's not controllable. Other options include opening windows from the previous session, or opening an arbitrary home page. None of these guarantees that there will be a controllable window open and focused.I read through the chrome docs and tried a few things. Although you don't have access to create an arbitrary window on startup, you can define an options panel and open that on startup.
Ideally, we would only open this window if there aren't already controllable windows. Although we can't check to see if there are controllable windows on startup itself, we can have our options panel issue the
closeCurrentTab
action once the page is loaded. Since that action only closes the tab if there are other controllable tabs/windows open, this ensures that the page only remains open if it's actually needed.