2018-06-18 18:39:12 +03:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
[
|
2018-07-31 21:14:03 +03:00
|
|
|
{
|
|
|
|
"namespace": "manifest",
|
|
|
|
"types": [
|
|
|
|
{
|
2020-04-11 23:35:59 +03:00
|
|
|
"$extend": "OptionalPermissionNoPrompt",
|
2018-07-31 21:14:03 +03:00
|
|
|
"choices": [{
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"search"
|
|
|
|
]
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2018-06-18 18:39:12 +03:00
|
|
|
{
|
|
|
|
"namespace": "search",
|
|
|
|
"description": "Use browser.search to interact with search engines.",
|
2018-07-31 21:14:03 +03:00
|
|
|
"permissions": ["search"],
|
2018-06-18 18:39:12 +03:00
|
|
|
"types": [
|
|
|
|
{
|
|
|
|
"id": "SearchEngine",
|
|
|
|
"type": "object",
|
|
|
|
"description": "An object encapsulating a search engine",
|
|
|
|
"properties": {
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2018-07-12 23:55:25 +03:00
|
|
|
"isDefault": {
|
2018-06-18 18:39:12 +03:00
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"alias": {
|
|
|
|
"type": "string",
|
|
|
|
"optional": true
|
|
|
|
},
|
2018-07-12 23:55:25 +03:00
|
|
|
"favIconUrl": {
|
2018-06-18 18:39:12 +03:00
|
|
|
"type": "string",
|
|
|
|
"optional": true,
|
|
|
|
"format": "url"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"functions": [
|
|
|
|
{
|
|
|
|
"name": "get",
|
|
|
|
"type": "function",
|
|
|
|
"description": "Gets a list of search engines.",
|
|
|
|
"async": true,
|
|
|
|
"parameters": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "search",
|
|
|
|
"type": "function",
|
|
|
|
"description": "Perform a search.",
|
2018-07-12 23:55:25 +03:00
|
|
|
"async": true,
|
2018-06-18 18:39:12 +03:00
|
|
|
"parameters": [
|
|
|
|
{
|
2018-08-21 17:43:46 +03:00
|
|
|
"type": "object",
|
|
|
|
"name": "searchProperties",
|
|
|
|
"properties": {
|
|
|
|
"query": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "Terms to search for."
|
|
|
|
},
|
|
|
|
"engine": {
|
|
|
|
"type": "string",
|
|
|
|
"optional": true,
|
|
|
|
"description": "Search engine to use. Uses the default if not specified."
|
|
|
|
},
|
|
|
|
"tabId": {
|
|
|
|
"type": "integer",
|
|
|
|
"optional": true,
|
|
|
|
"description": "The ID of the tab for the search results. If not specified, a new tab is created."
|
|
|
|
}
|
|
|
|
}
|
2018-06-18 18:39:12 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|