Is it possible to add multiple search engines in the same firefox Web Extension?

Viewed 242

I'm building a web extension that add search engines to Firefox using the chrome_settings_overrides manifest key.

My manifest.json looks like that, is valid and works:

{
  "manifest_version": 2,
  "name": "foo Search",
  "short_name": "foo-search",
  "description": "Adds foo as a search engine.",
  "version": "1.0.0",
  "icons": {
    "16": "icons/foo_16x16.png",
    "64": "icons/foo.svg",
    "256": "icons/foo.svg"
  },
  "chrome_settings_overrides": {
    "search_provider": {
      "name": "foo search",
      "keyword": "foo",
      "favicon_url": "https://www.example.org/static/favicon.ico",
      "search_url": "https://www.example.org/foo/?q={searchTerms}"
    }
  },
  "browser_specific_settings": {
    "gecko": {
        "id": "foo@example.org",
        "strict_min_version": "55.0"
    }
  }
}

By experimentation, it seems that chrome_settings_overrides does accept only an object and not an array of objects so I didn't manage to set several search_provider in the same extension. Does this mean that if foo app has let's say 7 search engines for 7 parts of the website, I have to create 7 extensions? Or is there a way to package the 7 search engines in one extension?

0 Answers
Related