tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

search.json (3611B)


      1 [
      2  {
      3    "namespace": "manifest",
      4    "types": [
      5      {
      6        "$extend": "OptionalPermissionNoPrompt",
      7        "choices": [
      8          {
      9            "type": "string",
     10            "enum": ["search"]
     11          }
     12        ]
     13      }
     14    ]
     15  },
     16  {
     17    "namespace": "search",
     18    "description": "Use browser.search to interact with search engines.",
     19    "permissions": ["search"],
     20    "types": [
     21      {
     22        "id": "SearchEngine",
     23        "type": "object",
     24        "description": "An object encapsulating a search engine",
     25        "properties": {
     26          "name": {
     27            "type": "string"
     28          },
     29          "isDefault": {
     30            "type": "boolean"
     31          },
     32          "alias": {
     33            "type": "string",
     34            "optional": true
     35          },
     36          "favIconUrl": {
     37            "type": "string",
     38            "optional": true,
     39            "format": "url"
     40          }
     41        }
     42      },
     43      {
     44        "id": "Disposition",
     45        "type": "string",
     46        "description": "Location where search results should be displayed.",
     47        "enum": ["CURRENT_TAB", "NEW_TAB", "NEW_WINDOW"]
     48      }
     49    ],
     50    "functions": [
     51      {
     52        "name": "get",
     53        "type": "function",
     54        "description": "Gets a list of search engines.",
     55        "async": true,
     56        "parameters": []
     57      },
     58      {
     59        "name": "search",
     60        "type": "function",
     61        "description": "Perform a search.",
     62        "async": true,
     63        "parameters": [
     64          {
     65            "type": "object",
     66            "name": "searchProperties",
     67            "properties": {
     68              "query": {
     69                "type": "string",
     70                "description": "Terms to search for."
     71              },
     72              "engine": {
     73                "type": "string",
     74                "optional": true,
     75                "description": "Search engine to use. Uses the default if not specified."
     76              },
     77              "disposition": {
     78                "$ref": "Disposition",
     79                "optional": true,
     80                "description": "Location where search results should be displayed. NEW_TAB is the default."
     81              },
     82              "tabId": {
     83                "type": "integer",
     84                "optional": true,
     85                "description": "The ID of the tab for the search results. If not specified, a new tab is created, unless disposition is set. tabId cannot be used with disposition."
     86              }
     87            }
     88          }
     89        ]
     90      },
     91      {
     92        "name": "query",
     93        "type": "function",
     94        "async": "callback",
     95        "description": "Use the chrome.search API to search via the default provider.",
     96        "parameters": [
     97          {
     98            "type": "object",
     99            "name": "queryInfo",
    100            "properties": {
    101              "text": {
    102                "type": "string",
    103                "description": "String to query with the default search provider."
    104              },
    105              "disposition": {
    106                "$ref": "Disposition",
    107                "optional": true,
    108                "description": "Location where search results should be displayed. CURRENT_TAB is the default."
    109              },
    110              "tabId": {
    111                "type": "integer",
    112                "optional": true,
    113                "description": "Location where search results should be displayed. tabId cannot be used with disposition."
    114              }
    115            }
    116          },
    117          {
    118            "type": "function",
    119            "name": "callback",
    120            "optional": true,
    121            "parameters": []
    122          }
    123        ]
    124      }
    125    ]
    126  }
    127 ]