summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/schemas/content_scripts.json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /toolkit/components/extensions/schemas/content_scripts.json
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/extensions/schemas/content_scripts.json')
-rw-r--r--toolkit/components/extensions/schemas/content_scripts.json106
1 files changed, 106 insertions, 0 deletions
diff --git a/toolkit/components/extensions/schemas/content_scripts.json b/toolkit/components/extensions/schemas/content_scripts.json
new file mode 100644
index 0000000000..a45dc30918
--- /dev/null
+++ b/toolkit/components/extensions/schemas/content_scripts.json
@@ -0,0 +1,106 @@
+[
+ {
+ "namespace": "contentScripts",
+ "max_manifest_version": 2,
+ "types": [
+ {
+ "id": "RegisteredContentScriptOptions",
+ "type": "object",
+ "description": "Details of a content script registered programmatically",
+ "properties": {
+ "matches": {
+ "type": "array",
+ "optional": false,
+ "minItems": 1,
+ "items": { "$ref": "manifest.MatchPattern" }
+ },
+ "excludeMatches": {
+ "type": "array",
+ "optional": true,
+ "minItems": 1,
+ "items": { "$ref": "manifest.MatchPattern" }
+ },
+ "includeGlobs": {
+ "type": "array",
+ "optional": true,
+ "items": { "type": "string" }
+ },
+ "excludeGlobs": {
+ "type": "array",
+ "optional": true,
+ "items": { "type": "string" }
+ },
+ "css": {
+ "type": "array",
+ "optional": true,
+ "description": "The list of CSS files to inject",
+ "items": { "$ref": "extensionTypes.ExtensionFileOrCode" }
+ },
+ "js": {
+ "type": "array",
+ "optional": true,
+ "description": "The list of JS files to inject",
+ "items": { "$ref": "extensionTypes.ExtensionFileOrCode" }
+ },
+ "allFrames": {
+ "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."
+ },
+ "matchAboutBlank": {
+ "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>."
+ },
+ "runAt": {
+ "$ref": "extensionTypes.RunAt",
+ "optional": true,
+ "description": "The soonest that the JavaScript or CSS will be injected into the tab. Defaults to \"document_idle\"."
+ },
+ "cookieStoreId": {
+ "choices": [
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": { "type": "string" }
+ },
+ {
+ "type": "string"
+ }
+ ],
+ "optional": true,
+ "description": "limit the set of matched tabs to those that belong to the given cookie store id"
+ }
+ }
+ },
+ {
+ "id": "RegisteredContentScript",
+ "type": "object",
+ "description": "An object that represents a content script registered programmatically",
+ "functions": [
+ {
+ "name": "unregister",
+ "type": "function",
+ "description": "Unregister a content script registered programmatically",
+ "async": true,
+ "parameters": []
+ }
+ ]
+ }
+ ],
+ "functions": [
+ {
+ "name": "register",
+ "type": "function",
+ "description": "Register a content script programmatically",
+ "async": true,
+ "parameters": [
+ {
+ "name": "contentScriptOptions",
+ "$ref": "RegisteredContentScriptOptions"
+ }
+ ]
+ }
+ ]
+ }
+]