summaryrefslogtreecommitdiffstats
path: root/toolkit/components/webextensions/schemas/manifest.json
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-09 11:10:00 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-09 11:10:00 -0500
commitf164d9124708b50789dbb6959e1de96cc5697c48 (patch)
tree6dffd12e08c5383130df0252fb69cd6d6330794f /toolkit/components/webextensions/schemas/manifest.json
parent30de4018913f0cdaea19d1dd12ecd8209e2ed08e (diff)
downloadUXP-f164d9124708b50789dbb6959e1de96cc5697c48.tar
UXP-f164d9124708b50789dbb6959e1de96cc5697c48.tar.gz
UXP-f164d9124708b50789dbb6959e1de96cc5697c48.tar.lz
UXP-f164d9124708b50789dbb6959e1de96cc5697c48.tar.xz
UXP-f164d9124708b50789dbb6959e1de96cc5697c48.zip
Rename Toolkit's webextensions component directory to better reflect what it is.
Diffstat (limited to 'toolkit/components/webextensions/schemas/manifest.json')
-rw-r--r--toolkit/components/webextensions/schemas/manifest.json377
1 files changed, 377 insertions, 0 deletions
diff --git a/toolkit/components/webextensions/schemas/manifest.json b/toolkit/components/webextensions/schemas/manifest.json
new file mode 100644
index 000000000..09e6b56fb
--- /dev/null
+++ b/toolkit/components/webextensions/schemas/manifest.json
@@ -0,0 +1,377 @@
+[
+ {
+ "namespace": "manifest",
+ "types": [
+ {
+ "id": "WebExtensionManifest",
+ "type": "object",
+ "description": "Represents a WebExtension manifest.json file",
+ "properties": {
+ "manifest_version": {
+ "type": "integer",
+ "minimum": 2,
+ "maximum": 2
+ },
+
+ "minimum_chrome_version":{
+ "type": "string",
+ "optional": true
+ },
+
+ "applications": {
+ "type": "object",
+ "optional": true,
+ "properties": {
+ "gecko": {
+ "$ref": "FirefoxSpecificProperties",
+ "optional": true
+ }
+ }
+ },
+
+ "browser_specific_settings": {
+ "type": "object",
+ "optional": true,
+ "properties": {
+ "gecko": {
+ "$ref": "FirefoxSpecificProperties",
+ "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
+ },
+
+ "homepage_url": {
+ "type": "string",
+ "format": "url",
+ "optional": true,
+ "preprocess": "localize"
+ },
+
+ "icons": {
+ "type": "object",
+ "optional": true,
+ "patternProperties": {
+ "^[1-9]\\d*$": { "type": "string" }
+ }
+ },
+
+ "incognito": {
+ "type": "string",
+ "enum": ["spanning"],
+ "optional": true,
+ "onError": "warn"
+ },
+
+ "background": {
+ "choices": [
+ {
+ "type": "object",
+ "properties": {
+ "page": { "$ref": "ExtensionURL" },
+ "persistent": {
+ "optional": true,
+ "$ref": "PersistentBackgroundProperty"
+ }
+ },
+ "additionalProperties": { "$ref": "UnrecognizedProperty" }
+ },
+ {
+ "type": "object",
+ "properties": {
+ "scripts": {
+ "type": "array",
+ "items": { "$ref": "ExtensionURL" }
+ },
+ "persistent": {
+ "optional": true,
+ "$ref": "PersistentBackgroundProperty"
+ }
+ },
+ "additionalProperties": { "$ref": "UnrecognizedProperty" }
+ }
+ ],
+ "optional": true
+ },
+
+ "options_ui": {
+ "type": "object",
+
+ "optional": true,
+
+ "properties": {
+ "page": { "$ref": "ExtensionURL" },
+ "browser_style": {
+ "type": "boolean",
+ "optional": true
+ },
+ "chrome_style": {
+ "type": "boolean",
+ "optional": true
+ },
+ "open_in_tab": {
+ "type": "boolean",
+ "optional": true
+ }
+ },
+
+ "additionalProperties": {
+ "type": "any",
+ "deprecated": "An unexpected property was found in the WebExtension manifest"
+ }
+ },
+
+ "content_scripts": {
+ "type": "array",
+ "optional": true,
+ "items": { "$ref": "ContentScript" }
+ },
+
+ "content_security_policy": {
+ "type": "string",
+ "optional": true,
+ "format": "contentSecurityPolicy",
+ "onError": "warn"
+ },
+
+ "permissions": {
+ "type": "array",
+ "items": {
+ "choices": [
+ { "$ref": "Permission" },
+ {
+ "type": "string",
+ "deprecated": "Unknown permission ${value}"
+ }
+ ]
+ },
+ "optional": true
+ },
+
+ "web_accessible_resources": {
+ "type": "array",
+ "items": { "type": "string" },
+ "optional": true
+ },
+
+ "developer": {
+ "type": "object",
+ "optional": true,
+ "properties": {
+ "name": {
+ "type": "string",
+ "optional": true,
+ "preprocess": "localize"
+ },
+ "url": {
+ "type": "string",
+ "optional": true,
+ "preprocess": "localize"
+ }
+ }
+ }
+
+ },
+
+ "additionalProperties": { "$ref": "UnrecognizedProperty" }
+ },
+ {
+ "id": "Permission",
+ "choices": [
+ {
+ "type": "string",
+ "enum": [
+ "alarms",
+ "clipboardWrite",
+ "idle",
+ "notifications",
+ "storage"
+ ]
+ },
+ { "$ref": "MatchPattern" }
+ ]
+ },
+ {
+ "id": "ExtensionURL",
+ "type": "string",
+ "format": "strictRelativeUrl"
+ },
+ {
+ "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": "MatchPattern",
+ "choices": [
+ {
+ "type": "string",
+ "enum": ["<all_urls>"]
+ },
+ {
+ "type": "string",
+ "pattern": "^(https?|file|ftp|\\*)://(\\*|\\*\\.[^*/]+|[^*/]+)/.*$"
+ },
+ {
+ "type": "string",
+ "pattern": "^file:///.*$"
+ }
+ ]
+ },
+ {
+ "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 CSS 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 matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is <code>false</code>."},
+ "run_at": {
+ "$ref": "extensionTypes.RunAt",
+ "optional": true,
+ "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": "ExtensionURL" }
+ },
+ "additionalProperties": false
+ },
+ { "$ref": "ExtensionURL" }
+ ]
+ },
+ {
+ "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."
+ },
+ {
+ "id": "PersistentBackgroundProperty",
+ "type": "boolean",
+ "deprecated": "Event pages are not currently supported. This will run as a persistent background page."
+ }
+ ]
+ }
+]