Some years ago, I made this extension where most of the business logic happens in the background script. It works well when triggered from the custom button showing in the toolbar.
I would now very much like to knock things up a notch and have:
- background script executed as soon as Firefox has finished starting
- open the freshly backed myextension.html
- pin this tab
As of now, I am not quite sure how to detect the event “as soon as Firefox has finished starting”. Initially I had tried to react to browser.windows.onCreated, but it would seem that this event fires too early in the startup sequence.
browser.windows.onCreated.addListener(function () {
//do stuff with bookmarks and tabs
});
The event that I am looking for would be one that would fire as soon as the browser is finally fully armed and loaded, but not before. (Split second later would be acceptable, too).