| 类型 |
对象
|
|---|---|
| Mandatory | No |
| 范例 |
|
使用
chrome_settings_overrides
key to override the browser's home page and add a new search engine.
chrome_settings_overrides
key is an object that may have the following properties:
| 名称 | 类型 | 描述 |
|---|---|---|
homepage
|
字符串
|
Defines the page to be used as the browser's homepage. The replacement is given as a URL. The URL may:
If two or more extensions both set this value, then the setting from the most recently installed one will take precedence. To override new tabs, use " chrome_url_overrides " instead. 这是 localizable property . |
search_provider
|
对象
|
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
"
The search provider will be presented to the user alongside the
built-in providers. If you include the
This is an object with the properties listed below. All string properties are localizable .
String: The search engine's name, displayed to the user. String: URL used by the search engine. This must be an HTTPS URL. String: URL used for image search. String: URL used for instant search. String: Address bar keyword for the search engine. The ID of a built-in search engine to use. String: URL used for search suggestions. This must be an HTTPS URL. |
This example shows how to set a search provider.
"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"
}
}
BCD tables only load in the browser
最后修改: , 由 MDN 贡献者