tor-browser

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

find.json (3716B)


      1 [
      2  {
      3    "namespace": "manifest",
      4    "types": [
      5      {
      6        "$extend": "OptionalPermission",
      7        "choices": [
      8          {
      9            "type": "string",
     10            "enum": ["find"]
     11          }
     12        ]
     13      }
     14    ]
     15  },
     16  {
     17    "namespace": "find",
     18    "description": "Use the <code>browser.find</code> API to interact with the browser's <code>Find</code> interface.",
     19    "permissions": ["find"],
     20    "functions": [
     21      {
     22        "name": "find",
     23        "type": "function",
     24        "async": true,
     25        "description": "Search for text in document and store found ranges in array, in document order.",
     26        "parameters": [
     27          {
     28            "name": "queryphrase",
     29            "type": "string",
     30            "description": "The string to search for."
     31          },
     32          {
     33            "name": "params",
     34            "type": "object",
     35            "description": "Search parameters.",
     36            "optional": true,
     37            "properties": {
     38              "tabId": {
     39                "type": "integer",
     40                "description": "Tab to query. Defaults to the active tab.",
     41                "optional": true,
     42                "minimum": 0
     43              },
     44              "caseSensitive": {
     45                "type": "boolean",
     46                "description": "Find only ranges with case sensitive match.",
     47                "optional": true
     48              },
     49              "matchDiacritics": {
     50                "type": "boolean",
     51                "description": "Find only ranges with diacritic sensitive match.",
     52                "optional": true
     53              },
     54              "entireWord": {
     55                "type": "boolean",
     56                "description": "Find only ranges that match entire word.",
     57                "optional": true
     58              },
     59              "includeRectData": {
     60                "description": "Return rectangle data which describes visual position of search results.",
     61                "type": "boolean",
     62                "optional": true
     63              },
     64              "includeRangeData": {
     65                "description": "Return range data which provides range data in a serializable form.",
     66                "type": "boolean",
     67                "optional": true
     68              }
     69            }
     70          }
     71        ]
     72      },
     73      {
     74        "name": "highlightResults",
     75        "type": "function",
     76        "async": true,
     77        "description": "Highlight a range",
     78        "parameters": [
     79          {
     80            "name": "params",
     81            "type": "object",
     82            "description": "highlightResults parameters",
     83            "optional": true,
     84            "properties": {
     85              "rangeIndex": {
     86                "type": "integer",
     87                "description": "Found range to be highlighted. Default highlights all ranges.",
     88                "minimum": 0,
     89                "optional": true
     90              },
     91              "tabId": {
     92                "type": "integer",
     93                "description": "Tab to highlight. Defaults to the active tab.",
     94                "minimum": 0,
     95                "optional": true
     96              },
     97              "noScroll": {
     98                "type": "boolean",
     99                "description": "Don't scroll to highlighted item.",
    100                "optional": true
    101              }
    102            }
    103          }
    104        ]
    105      },
    106      {
    107        "name": "removeHighlighting",
    108        "type": "function",
    109        "async": true,
    110        "description": "Remove all highlighting from previous searches.",
    111        "parameters": [
    112          {
    113            "name": "tabId",
    114            "type": "integer",
    115            "description": "Tab to highlight. Defaults to the active tab.",
    116            "optional": true
    117          }
    118        ]
    119      }
    120    ]
    121  }
    122 ]