MDN’s new design is in Beta! A sneak peek: https://blog.mozilla.org/opendesign/mdns-new-design-beta/

chrome_settings_overrides

Cette traduction est incomplète. Aidez à traduire cet article depuis l'anglais.

Utilisez la clé chrome_settings_overrides to override certain browser settings. pour remplacer certains paramètres du navigateur. Deux paramètres sont disponibles :

  • "homepage", qui vous permet de remplacer la page d'accueil du navigateur.
  • "search_provider", qui vous permet d'ajouter un nouveau moteur de recherche.
"chrome_settings_overrides" : {
  "homepage": "https://developer.mozilla.org/"
}
"chrome_settings_overrides": {
  "search_provider": {
    "name": "Discogs",
    "search_url": "https://www.discogs.com/search/?q={searchTerms}",
    "keyword": "disc",
    "favicon_url": "https://www.discogs.com/favicon.ico"
  }
}
Manifest key: chrome_settings_overrides
Type Object
Obligatoire Non

Syntaxe

La clé chrome_settings_overrides est un objet qui peut avoir les propriétés suivantes:

Name Type Description
homepage String

Defines the page to be used as the browser's homepage.

The replacement is given as a URL. The URL may:

  • point to a file bundled with the extension, in which case it is given as a URL relative to the manifest.json file
  • be a remote URL, such as "https://developer.mozilla.org/".

If two or more extensions both set this value, then the last one that gets to run (i.e. the most recently installed or enabled) one wins. If the user changes the homepage using the browser's preferences UI, then this will override the extension's choice.

To override new tabs, use "chrome_url_overrides" instead.

This is a localizable property.

search_provider Object

Defines a search provider to add to the browser.

The search provider has a name and a primary search URL. Alternative URLs may be provided, including URLs for more specialized searches like image search. In the URL you supply, use "{searchTerms}" to interpolate the search term into the URL, like: https://www.discogs.com/search/?q={searchTerms}. You can also provide POST parameters to be sent along with the search.

The search provider will be presented to the user alongside the built-in providers. If you include the is_default property and set it to true, the new search provider will be the default option. By supplying the keyword property, you enable the user to select your search provider by typing the keyword into the search/address bar before the search term.

This is an object with the properties listed below. All string properties are localizable.

name
String: The search engine's name, displayed to the user.
search_url
String: URL used by the search engine. This must be an HTTPS URL.
is_default
Boolean: True if the search engine should be the default choice.
alternate_urls Facultatif
Array of String: An array of alternative URLs that can be used instead of search_url.
encoding Facultatif
String: Encoding of the search term, specified as a standard character encoding name, such as "UTF-8".
favicon_url Facultatif
String: URL pointing to an icon for the search engine. This must be a absolute HTTP or HTTPS URL.
image_url Facultatif
String: URL used for image search.
image_url_post_params Facultatif
String: POST parameters to send to image_url.
instant_url Facultatif
String: URL used for instant search.
instant_url_post_params Facultatif
String: POST parameters to send to instant_url.
keyword Facultatif
String: Address bar keyword for the search engine.
prepopulated_id Facultatif
The ID of a built-in search engine to use.
search_url_post_params Facultatif
String: POST parameters to send to search_url.
suggest_url Facultatif
String: URL used for search suggestions.
suggest_url_post_params Facultatif
String: POST parameters to send to suggest_url.

Compatibilité de navigateur

ChromeEdgeFirefoxFirefox for AndroidOpera
Basic supportYesNo55NoNo
homepageYesNo55NoNo
search_providerYesNo55NoNo
search_provider.alternate_urlsYesNoNoNoNo
search_provider.encodingYesNoNoNoNo
search_provider.favicon_urlYesNo55NoNo
search_provider.image_urlYesNoNoNoNo
search_provider.image_url_post_paramsYesNoNoNoNo
search_provider.instant_urlYesNoNoNoNo
search_provider.instant_url_post_paramsYesNoNoNoNo
search_provider.is_defaultYesNoNoNoNo
search_provider.keywordYesNo55NoNo
search_provider.nameYesNo55NoNo
search_provider.prepopulated_idYesNoNoNoNo
search_provider.search_urlYesNo55NoNo
search_provider.search_url_post_paramsYesNoNoNoNo
search_provider.suggest_urlYesNoNoNoNo
search_provider.suggest_url_post_paramsYesNoNoNoNo
startup_pagesYesNoNoNoNo

Étiquettes et contributeurs liés au document

 Contributeurs à cette page : hellosct1
 Dernière mise à jour par : hellosct1,