Source code

Revision control

Copy as Markdown

Other Tools

[
{
"namespace": "manifest",
"permissions": [],
"types": [
{
"id": "ManifestBase",
"type": "object",
"description": "Common properties for all manifest.json files",
"properties": {
"manifest_version": {
"type": "integer",
"minimum": 2,
"maximum": 3,
"postprocess": "manifestVersionCheck"
},
"applications": {
"$ref": "DeprecatedApplications",
"description": "The applications property is deprecated, please use 'browser_specific_settings'",
"optional": true,
"max_manifest_version": 2
},
"browser_specific_settings": {
"$ref": "BrowserSpecificSettings",
"optional": true
},
"name": {
"type": "string",
"optional": false,
"preprocess": "localize"
},
"short_name": {
"type": "string",
"optional": true,
"preprocess": "localize"
},
"description": {
"type": "string",
"optional": true,
"preprocess": "localize"
},
"author": {
"type": "string",
"optional": true,
"preprocess": "localize",
"onError": "warn"
},
"version": {
"type": "string",
"optional": false,
"format": "versionString"
},
"homepage_url": {
"type": "string",
"format": "url",
"optional": true,
"preprocess": "localize"
},
"install_origins": {
"type": "array",
"optional": true,
"items": {
"type": "string",
"format": "origin"
}
},
"developer": {
"type": "object",
"optional": true,
"properties": {
"name": {
"type": "string",
"optional": true,
"preprocess": "localize"
},
"url": {
"type": "string",
"format": "url",
"optional": true,
"preprocess": "localize",
"onError": "warn"
}
}
}
}
},
{
"id": "WebExtensionManifest",
"type": "object",
"description": "Represents a WebExtension manifest.json file",
"$import": "ManifestBase",
"properties": {
"minimum_chrome_version": {
"type": "string",
"optional": true
},
"minimum_opera_version": {
"type": "string",
"optional": true
},
"icons": {
"type": "object",
"optional": true,
"patternProperties": {
"^[1-9]\\d*$": { "$ref": "ExtensionFileUrl" }
}
},
"incognito": {
"type": "string",
"description": "The 'split' value is not supported.",
"enum": ["not_allowed", "spanning", "split"],
"postprocess": "incognitoSplitUnsupportedAndFallback",
"default": "spanning",
"optional": true
},
"background": {
"choices": [
{
"type": "object",
"properties": {
"page": { "$ref": "ExtensionURL" },
"persistent": {
"optional": true,
"type": "boolean",
"max_manifest_version": 2,
"default": true
}
},
"additionalProperties": { "$ref": "UnrecognizedProperty" }
},
{
"type": "object",
"properties": {
"scripts": {
"type": "array",
"items": { "$ref": "ExtensionURL" }
},
"type": {
"optional": true,
"type": "string",
"enum": ["module", "classic"]
},
"persistent": {
"optional": true,
"type": "boolean",
"max_manifest_version": 2,
"default": true
}
},
"additionalProperties": { "$ref": "UnrecognizedProperty" }
},
{
"type": "object",
"properties": {
"service_worker": { "$ref": "ExtensionURL" }
},
"postprocess": "requireBackgroundServiceWorkerEnabled"
}
],
"optional": true
},
"options_page": {
"$ref": "ExtensionURL",
"optional": true,
"description": "Alias property for options_ui.page, ignored when options_ui.page is set. When using this property the options page is always opened in a new tab."
},
"options_ui": {
"type": "object",
"optional": true,
"properties": {
"page": { "$ref": "ExtensionURL" },
"browser_style": {
"type": "boolean",
"optional": true,
"description": "Defaults to true in Manifest V2; Deprecated in Manifest V3."
},
"chrome_style": {
"type": "boolean",
"optional": true,
"max_manifest_version": 2,
"description": "chrome_style is ignored in Firefox. Its replacement (browser_style) has been deprecated."
},
"open_in_tab": {
"type": "boolean",
"optional": true
}
},
"additionalProperties": { "$ref": "UnrecognizedProperty" }
},
"content_scripts": {
"type": "array",
"optional": true,
"items": { "$ref": "ContentScript" }
},
"content_security_policy": {
"optional": true,
"onError": "warn",
"choices": [
{
"max_manifest_version": 2,
"type": "string",
"format": "contentSecurityPolicy"
},
{
"min_manifest_version": 3,
"type": "object",
"additionalProperties": {
"$ref": "UnrecognizedProperty"
},
"properties": {
"extension_pages": {
"type": "string",
"optional": true,
"format": "contentSecurityPolicy",
"description": "The Content Security Policy used for extension pages."
}
}
}
]
},
"permissions": {
"default": [],
"optional": true,
"choices": [
{
"max_manifest_version": 2,
"type": "array",
"items": {
"$ref": "PermissionOrOrigin",
"onError": "warn"
}
},
{
"min_manifest_version": 3,
"type": "array",
"items": {
"$ref": "Permission",
"onError": "warn"
}
}
]
},
"granted_host_permissions": {
"type": "boolean",
"optional": true,
"default": false
},
"host_permissions": {
"min_manifest_version": 3,
"type": "array",
"items": {
"$ref": "MatchPattern",
"onError": "warn"
},
"optional": true,
"default": []
},
"optional_permissions": {
"type": "array",
"items": {
"$ref": "OptionalPermissionOrOrigin",
"onError": "warn"
},
"optional": true,
"default": []
},
"web_accessible_resources": {
"optional": true,
"choices": [
{
"max_manifest_version": 2,
"type": "array",
"items": { "type": "string" }
},
{
"min_manifest_version": 3,
"type": "array",
"postprocess": "webAccessibleMatching",
"items": {
"type": "object",
"properties": {
"resources": {
"type": "array",
"items": { "type": "string" }
},
"matches": {
"optional": true,
"type": "array",
"items": { "$ref": "MatchPattern" }
},
"extension_ids": {
"optional": true,
"type": "array",
"items": {
"choices": [
{ "$ref": "ExtensionID" },
{ "type": "string", "enum": ["*"] }
]
}
}
},
"additionalProperties": { "$ref": "UnrecognizedProperty" }
}
}
]
},
"hidden": {
"type": "boolean",
"optional": true,
"default": false
}
},
"additionalProperties": { "$ref": "UnrecognizedProperty" }
},
{
"id": "WebExtensionLangpackManifest",
"type": "object",
"description": "Represents a WebExtension language pack manifest.json file",
"$import": "ManifestBase",
"properties": {
"langpack_id": {
"type": "string",
"pattern": "^[a-zA-Z][a-zA-Z-]+$"
},
"languages": {
"type": "object",
"patternProperties": {
"^[a-z]{2}[a-zA-Z-]*$": {
"type": "object",
"properties": {
"chrome_resources": {
"type": "object",
"patternProperties": {
"^[a-zA-Z-.]+$": {
"choices": [
{
"$ref": "ExtensionURL"
},
{
"type": "object",
"patternProperties": {
"^[a-z]+$": {
"$ref": "ExtensionURL"
}
}
}
]
}
}
},
"version": {
"type": "string"
}
}
}
}
},
"sources": {
"type": "object",
"optional": true,
"patternProperties": {
"^[a-z]+$": {
"type": "object",
"properties": {
"base_path": {
"$ref": "ExtensionURL"
},
"paths": {
"type": "array",
"items": {
"type": "string",
"format": "strictRelativeUrl"
},
"optional": true
}
}
}
}
}
}
},
{
"id": "WebExtensionDictionaryManifest",
"type": "object",
"description": "Represents a WebExtension dictionary manifest.json file",
"$import": "ManifestBase",
"properties": {
"dictionaries": {
"type": "object",
"patternProperties": {
"^[a-z]{2}[a-zA-Z-]*$": {
"type": "string",
"format": "strictRelativeUrl",
"pattern": "\\.dic$"
}
}
}
}
},
{
"id": "WebExtensionSitePermissionsManifest",
"type": "object",
"description": "Represents a WebExtension site permissions manifest.json file",
"$import": "ManifestBase",
"properties": {
"site_permissions": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "SitePermission"
}
},
"install_origins": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"format": "origin"
}
}
}
},
{
"id": "ThemeIcons",
"type": "object",
"properties": {
"light": {
"$ref": "ExtensionURL",
"description": "A light icon to use for dark themes"
},
"dark": {
"$ref": "ExtensionURL",
"description": "The dark icon to use for light themes"
},
"size": {
"type": "integer",
"description": "The size of the icons"
}
},
"additionalProperties": { "$ref": "UnrecognizedProperty" }
},
{
"id": "OptionalPermissionNoPrompt",
"choices": [
{
"type": "string",
"enum": ["idle"]
}
]
},
{
"id": "OptionalPermission",
"choices": [
{ "$ref": "OptionalPermissionNoPrompt" },
{
"type": "string",
"enum": [
"clipboardRead",
"clipboardWrite",
"geolocation",
"notifications"
]
}
]
},
{
"id": "OptionalPermissionOrOrigin",
"choices": [
{ "$ref": "OptionalPermission" },
{ "$ref": "MatchPattern" }
]
},
{
"id": "PermissionPrivileged",
"choices": [
{
"type": "string",
"enum": ["mozillaAddons"]
}
]
},
{
"id": "PermissionNoPrompt",
"choices": [
{ "$ref": "OptionalPermissionNoPrompt" },
{ "$ref": "PermissionPrivileged" },
{
"type": "string",
"enum": ["alarms", "storage", "unlimitedStorage"]
}
]
},
{
"id": "Permission",
"choices": [
{ "$ref": "PermissionNoPrompt" },
{ "$ref": "OptionalPermission" }
]
},
{
"id": "PermissionOrOrigin",
"choices": [{ "$ref": "Permission" }, { "$ref": "MatchPattern" }]
},
{
"id": "SitePermission",
"choices": [
{
"type": "string",
"enum": ["midi", "midi-sysex"]
}
]
},
{
"id": "HttpURL",
"type": "string",
"format": "url",
"pattern": "^https?://.*$"
},
{
"id": "ExtensionURL",
"type": "string",
"format": "strictRelativeUrl"
},
{
"id": "ExtensionFileUrl",
"type": "string",
"format": "strictRelativeUrl",
"pattern": "\\S",
"preprocess": "localize"
},
{
"id": "ImageDataOrExtensionURL",
"type": "string",
"format": "imageDataOrStrictRelativeUrl"
},
{
"id": "ExtensionID",
"choices": [
{
"type": "string",
"pattern": "(?i)^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"
},
{
"type": "string",
"pattern": "(?i)^[a-z0-9-._]*@[a-z0-9-._]+$"
}
]
},
{
"id": "FirefoxSpecificProperties",
"type": "object",
"properties": {
"id": {
"$ref": "ExtensionID",
"optional": true
},
"update_url": {
"type": "string",
"format": "url",
"optional": true
},
"strict_min_version": {
"type": "string",
"optional": true
},
"strict_max_version": {
"type": "string",
"optional": true
}
}
},
{
"id": "GeckoAndroidSpecificProperties",
"type": "object",
"properties": {
"strict_min_version": {
"type": "string",
"optional": true
},
"strict_max_version": {
"type": "string",
"optional": true
}
},
"additionalProperties": { "type": "any" }
},
{
"id": "DeprecatedApplications",
"type": "object",
"properties": {
"gecko": {
"$ref": "FirefoxSpecificProperties",
"optional": true
},
"gecko_android": {
"$ref": "GeckoAndroidSpecificProperties",
"optional": true,
"unsupported": true
}
},
"additionalProperties": { "type": "any" }
},
{
"id": "BrowserSpecificSettings",
"type": "object",
"properties": {
"gecko": {
"$ref": "FirefoxSpecificProperties",
"optional": true
},
"gecko_android": {
"$ref": "GeckoAndroidSpecificProperties",
"optional": true
}
},
"additionalProperties": { "type": "any" }
},
{
"id": "MatchPattern",
"choices": [
{
"type": "string",
"enum": ["<all_urls>"]
},
{
"$ref": "MatchPatternRestricted"
},
{
"$ref": "MatchPatternUnestricted"
}
]
},
{
"id": "MatchPatternRestricted",
"description": "Same as MatchPattern above, but excludes <all_urls>",
"choices": [
{
"type": "string",
"pattern": "^(https?|wss?|file|ftp|\\*)://(\\*|\\*\\.[^*/]+|[^*/]+)/.*$"
},
{
"type": "string",
"pattern": "^file:///.*$"
}
]
},
{
"id": "MatchPatternUnestricted",
"description": "Mostly unrestricted match patterns for privileged add-ons. This should technically be rejected for unprivileged add-ons, but, reasons. The MatchPattern class will still refuse privileged schemes for those extensions.",
"choices": [
{
"type": "string",
}
]
},
{
"id": "ContentScript",
"type": "object",
"description": "Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time. Based on InjectDetails, but using underscore rather than camel case naming conventions.",
"additionalProperties": { "$ref": "UnrecognizedProperty" },
"properties": {
"matches": {
"type": "array",
"optional": false,
"minItems": 1,
"items": { "$ref": "MatchPattern" }
},
"exclude_matches": {
"type": "array",
"optional": true,
"minItems": 1,
"items": { "$ref": "MatchPattern" }
},
"include_globs": {
"type": "array",
"optional": true,
"items": { "type": "string" }
},
"exclude_globs": {
"type": "array",
"optional": true,
"items": { "type": "string" }
},
"css": {
"type": "array",
"optional": true,
"description": "The list of CSS files to inject",
"items": { "$ref": "ExtensionURL" }
},
"js": {
"type": "array",
"optional": true,
"description": "The list of JS files to inject",
"items": { "$ref": "ExtensionURL" }
},
"all_frames": {
"type": "boolean",
"optional": true,
"description": "If allFrames is <code>true</code>, implies that the JavaScript or CSS should be injected into all frames of current page. By default, it's <code>false</code> and is only injected into the top frame."
},
"match_about_blank": {
"type": "boolean",
"optional": true,
"description": "If match_about_blank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Ignored if match_origin_as_fallback is specified. By default it is <code>false</code>."
},
"match_origin_as_fallback": {
"type": "boolean",
"optional": true,
"description": "If match_origin_as_fallback is true, then the code is also injected in about:, data:, blob: when their origin matches the pattern in 'matches', even if the actual document origin is opaque (due to the use of CSP sandbox or iframe sandbox). Match patterns in 'matches' must specify a wildcard path glob. By default it is <code>false</code>."
},
"run_at": {
"$ref": "extensionTypes.RunAt",
"optional": true,
"default": "document_idle",
"description": "The soonest that the JavaScript or CSS will be injected into the tab. Defaults to \"document_idle\"."
}
}
},
{
"id": "IconPath",
"choices": [
{
"type": "object",
"patternProperties": {
"^[1-9]\\d*$": { "$ref": "ExtensionFileUrl" }
},
"additionalProperties": false
},
{ "$ref": "ExtensionFileUrl" }
]
},
{
"id": "IconImageData",
"choices": [
{
"type": "object",
"patternProperties": {
"^[1-9]\\d*$": { "$ref": "ImageData" }
},
"additionalProperties": false
},
{ "$ref": "ImageData" }
]
},
{
"id": "ImageData",
"type": "object",
"isInstanceOf": "ImageData",
"postprocess": "convertImageDataToURL"
},
{
"id": "UnrecognizedProperty",
"type": "any",
"deprecated": "An unexpected property was found in the WebExtension manifest."
}
]
}
]