8

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?
Lode
  • 2,160
  • 1
  • 20
  • 25

1 Answers1

0

Any changes of using this? (there is a index parameter for the position) https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/create

Javier Menéndez Rizo
  • 2,138
  • 3
  • 12
  • 22
  • I don't want to open a new tab. I want to show content when the user opens a new empty tab. So I don't call any javascript for managing tabs, all that is done with config: `"chrome_url_overrides": {"newtab": "page.html"}`. And I'm looking for the correct and working config to also make this work on the first tab, upon starting the browser or opening a new window. – Lode Jan 12 '19 at 18:52