How to load a page on the first tab / new window in a browser extension

Viewed 312

I have a browser extension for Chrome and Firefox and in the manifest.json I've defined a page to load on new tabs:

"chrome_url_overrides": {
    "newtab": "page.html"
},

In Firefox this shows my page in new tabs but not on the first tab or in new windows. In Chrome this is no issue and the page is shown for the first tab, new tabs and new windows.

I read about the homepage setting, which would be used like this:

"chrome_settings_overrides": {
    "homepage": "page.html"
},

As it resides in a different key (chrome_settings_overrides) I get the feeling it behaves differently as well but I can't find much about the differences or similarities between these two in the docs.

The Firefox docs actually links these two features together by stating you might need the other. (Firefox newtab and homepage, Chrome newtab and homepage.) Also I found this issue in the Firefox bugtracker (https://bugzilla.mozilla.org/show_bug.cgi?id=1341458) where they're moving the homepage setting from chrome_url_overrides to chrome_settings_overrides, so that implies they work similar.

Update: I tried making this change and it breaks the extension in Firefox without specific explanation and gives a warning in Chrome stating that the homepage should be a url.

Does someone know how to make an extention take over the first/new window in Firefox?

And optionally:

  • if there's any differences between these two features?
  • why Chrome seems to not need the homepage to be defined and uses the newtab setting for the first tab and new windows as well?
1 Answers
Related