Source code

Revision control

Copy as Markdown

Other Tools

{
"title": "UrlbarAction",
"description": "A template for messages that add a quick action button to the address bar, shown when the user types one of its keywords. Frequency caps are not currently supported, and no impressions, exposure or messaging telemetry are recorded; use the urlbar engagement telemetry, where actions appear as `fxms_<key>`.",
"type": "object",
"properties": {
"template": {
"type": "string",
"const": "urlbar_action"
},
"content": {
"type": "object",
"properties": {
"key": {
"type": "string",
"pattern": "^[a-z0-9_]{1,24}$",
"description": "Unique identifier for the action. Firefox registers it as `fxms_<key>`, which is how it appears in urlbar telemetry."
},
"keywords": {
"type": "array",
"items": {
},
"minItems": 1,
"description": "Typed text that shows the action. A localized string may hold several comma separated keywords."
},
"label": {
"description": "Text displayed on the action button."
},
"icon": {
"type": "string",
"pattern": "^(chrome|resource)://",
"description": "A chrome:// or resource:// URL of an icon that ships with Firefox."
},
"action": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"SHOW_SPOTLIGHT",
"OPEN_ABOUT_PAGE",
"OPEN_PREFERENCES_PAGE",
"OPEN_SUPPORT_PAGE",
"SELECT_AND_MARK_MENU_ITEM"
],
"description": "The special message action run when the action is picked."
},
"data": {
"type": "object",
"description": "Data for the action."
}
},
"required": ["type"],
"additionalProperties": true
}
},
"required": ["key", "keywords", "label", "icon", "action"],
"additionalProperties": true
}
},
"not": { "required": ["trigger"] },
"required": ["targeting"]
}