tor-browser

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

omnibox.json (7752B)


      1 [
      2  {
      3    "namespace": "manifest",
      4    "types": [
      5      {
      6        "$extend": "WebExtensionManifest",
      7        "properties": {
      8          "omnibox": {
      9            "type": "object",
     10            "additionalProperties": { "$ref": "UnrecognizedProperty" },
     11            "properties": {
     12              "keyword": {
     13                "type": "string",
     14                "pattern": "^[^?\\s:][^\\s:]*$"
     15              }
     16            },
     17            "optional": true
     18          }
     19        }
     20      }
     21    ]
     22  },
     23  {
     24    "namespace": "omnibox",
     25    "description": "The omnibox API allows you to register a keyword with Firefox's address bar.",
     26    "permissions": ["manifest:omnibox"],
     27    "types": [
     28      {
     29        "id": "DescriptionStyleType",
     30        "type": "string",
     31        "description": "The style type.",
     32        "enum": ["url", "match", "dim"]
     33      },
     34      {
     35        "id": "OnInputEnteredDisposition",
     36        "type": "string",
     37        "enum": ["currentTab", "newForegroundTab", "newBackgroundTab"],
     38        "description": "The window disposition for the omnibox query. This is the recommended context to display results. For example, if the omnibox command is to navigate to a certain URL, a disposition of 'newForegroundTab' means the navigation should take place in a new selected tab."
     39      },
     40      {
     41        "id": "SuggestResult",
     42        "type": "object",
     43        "description": "A suggest result.",
     44        "properties": {
     45          "content": {
     46            "type": "string",
     47            "minLength": 1,
     48            "description": "The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry."
     49          },
     50          "description": {
     51            "type": "string",
     52            "minLength": 1,
     53            "description": "The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a literal URL), 'match' (for highlighting text that matched what the user's query), and 'dim' (for dim helper text). The styles can be nested, eg. <dim><match>dimmed match</match></dim>. You must escape the five predefined entities to display them as text: stackoverflow.com/a/1091953/89484 "
     54          },
     55          "deletable": {
     56            "type": "boolean",
     57            "optional": true,
     58            "description": "Whether the suggest result can be deleted by the user."
     59          },
     60          "descriptionStyles": {
     61            "optional": true,
     62            "unsupported": true,
     63            "type": "array",
     64            "description": "An array of style ranges for the description, as provided by the extension.",
     65            "items": {
     66              "type": "object",
     67              "description": "The style ranges for the description, as provided by the extension.",
     68              "properties": {
     69                "offset": { "type": "integer" },
     70                "type": {
     71                  "description": "The style type",
     72                  "$ref": "DescriptionStyleType"
     73                },
     74                "length": { "type": "integer", "optional": true }
     75              }
     76            }
     77          },
     78          "descriptionStylesRaw": {
     79            "optional": true,
     80            "unsupported": true,
     81            "type": "array",
     82            "description": "An array of style ranges for the description, as provided by ToValue().",
     83            "items": {
     84              "type": "object",
     85              "description": "The style ranges for the description, as provided by ToValue().",
     86              "properties": {
     87                "offset": { "type": "integer" },
     88                "type": { "type": "integer" }
     89              }
     90            }
     91          }
     92        }
     93      },
     94      {
     95        "id": "DefaultSuggestResult",
     96        "type": "object",
     97        "description": "A suggest result.",
     98        "properties": {
     99          "description": {
    100            "type": "string",
    101            "minLength": 1,
    102            "description": "The text that is displayed in the URL dropdown."
    103          },
    104          "descriptionStyles": {
    105            "optional": true,
    106            "unsupported": true,
    107            "type": "array",
    108            "description": "An array of style ranges for the description, as provided by the extension.",
    109            "items": {
    110              "type": "object",
    111              "description": "The style ranges for the description, as provided by the extension.",
    112              "properties": {
    113                "offset": { "type": "integer" },
    114                "type": {
    115                  "description": "The style type",
    116                  "$ref": "DescriptionStyleType"
    117                },
    118                "length": { "type": "integer", "optional": true }
    119              }
    120            }
    121          },
    122          "descriptionStylesRaw": {
    123            "optional": true,
    124            "unsupported": true,
    125            "type": "array",
    126            "description": "An array of style ranges for the description, as provided by ToValue().",
    127            "items": {
    128              "type": "object",
    129              "description": "The style ranges for the description, as provided by ToValue().",
    130              "properties": {
    131                "offset": { "type": "integer" },
    132                "type": { "type": "integer" }
    133              }
    134            }
    135          }
    136        }
    137      }
    138    ],
    139    "functions": [
    140      {
    141        "name": "setDefaultSuggestion",
    142        "type": "function",
    143        "description": "Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar.",
    144        "parameters": [
    145          {
    146            "name": "suggestion",
    147            "$ref": "DefaultSuggestResult",
    148            "description": "A partial SuggestResult object, without the 'content' parameter."
    149          }
    150        ]
    151      }
    152    ],
    153    "events": [
    154      {
    155        "name": "onInputStarted",
    156        "type": "function",
    157        "description": "User has started a keyword input session by typing the extension's keyword. This is guaranteed to be sent exactly once per input session, and before any onInputChanged events.",
    158        "parameters": []
    159      },
    160      {
    161        "name": "onInputChanged",
    162        "type": "function",
    163        "description": "User has changed what is typed into the omnibox.",
    164        "parameters": [
    165          {
    166            "type": "string",
    167            "name": "text"
    168          },
    169          {
    170            "name": "suggest",
    171            "type": "function",
    172            "description": "A callback passed to the onInputChanged event used for sending suggestions back to the browser.",
    173            "parameters": [
    174              {
    175                "name": "suggestResults",
    176                "type": "array",
    177                "description": "Array of suggest results",
    178                "items": {
    179                  "$ref": "SuggestResult"
    180                }
    181              }
    182            ]
    183          }
    184        ]
    185      },
    186      {
    187        "name": "onInputEntered",
    188        "type": "function",
    189        "description": "User has accepted what is typed into the omnibox.",
    190        "parameters": [
    191          {
    192            "type": "string",
    193            "name": "text"
    194          },
    195          {
    196            "name": "disposition",
    197            "$ref": "OnInputEnteredDisposition"
    198          }
    199        ]
    200      },
    201      {
    202        "name": "onInputCancelled",
    203        "type": "function",
    204        "description": "User has ended the keyword input session without accepting the input.",
    205        "parameters": []
    206      },
    207      {
    208        "name": "onDeleteSuggestion",
    209        "type": "function",
    210        "description": "User has deleted a suggested result.",
    211        "parameters": [
    212          {
    213            "type": "string",
    214            "name": "text"
    215          }
    216        ]
    217      }
    218    ]
    219  }
    220 ]