summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/schemas/extension_protocol_handlers.json
blob: b77e1e7426a9bd47884347f254f9de6e56e77b24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
[
  {
    "namespace": "manifest",
    "types": [
      {
        "id": "ProtocolHandler",
        "type": "object",
        "description": "Represents a protocol handler definition.",
        "properties": {
          "name": {
            "description": "A user-readable title string for the protocol handler. This will be displayed to the user in interface objects as needed.",
            "type": "string"
          },
          "protocol": {
            "description": "The protocol the site wishes to handle, specified as a string. For example, you can register to handle SMS text message links by registering to handle the \"sms\" scheme.",
            "choices": [
              {
                "type": "string",
                "enum": [
                  "bitcoin",
                  "dat",
                  "dweb",
                  "ftp",
                  "geo",
                  "gopher",
                  "im",
                  "ipfs",
                  "ipns",
                  "irc",
                  "ircs",
                  "magnet",
                  "mailto",
                  "matrix",
                  "mms",
                  "news",
                  "nntp",
                  "sip",
                  "sms",
                  "smsto",
                  "ssb",
                  "ssh",
                  "tel",
                  "urn",
                  "webcal",
                  "wtai",
                  "xmpp"
                ]
              },
              {
                "type": "string",
                "pattern": "^(ext|web)\\+[a-z0-9.+-]+$"
              }
            ]
          },
          "uriTemplate": {
            "description": "The URL of the handler, as a string. This string should include \"%s\" as a placeholder which will be replaced with the escaped URL of the document to be handled. This URL might be a true URL, or it could be a phone number, email address, or so forth.",
            "preprocess": "localize",
            "choices": [{ "$ref": "ExtensionURL" }, { "$ref": "HttpURL" }]
          }
        }
      },
      {
        "$extend": "WebExtensionManifest",
        "properties": {
          "protocol_handlers": {
            "description": "A list of protocol handler definitions.",
            "optional": true,
            "type": "array",
            "items": { "$ref": "ProtocolHandler" }
          }
        }
      }
    ]
  }
]