webext-schema 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/schemas/beta/webext.json +131 -1
- package/schemas/central/webext.json +21 -1
package/package.json
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"commander": "^9.0.0",
|
|
33
33
|
"decamelize": "^6.0.0",
|
|
34
34
|
"json5": "^2.2.0",
|
|
35
|
-
"node-fetch": "^3.2.
|
|
35
|
+
"node-fetch": "^3.2.2",
|
|
36
36
|
"sinon": "^13.0.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"eslint": "^7.32.0",
|
|
42
42
|
"eslint-config-standard": "^16.0.3",
|
|
43
43
|
"eslint-plugin-import": "^2.25.4",
|
|
44
|
-
"eslint-plugin-jsdoc": "^37.9.
|
|
44
|
+
"eslint-plugin-jsdoc": "^37.9.7",
|
|
45
45
|
"eslint-plugin-node": "^11.1.0",
|
|
46
46
|
"eslint-plugin-promise": "^5.2.0",
|
|
47
47
|
"mocha": "^9.2.1",
|
|
48
48
|
"nock": "^13.2.4",
|
|
49
49
|
"npm-run-all": "^4.1.5"
|
|
50
50
|
},
|
|
51
|
-
"version": "2.1.
|
|
51
|
+
"version": "2.1.2"
|
|
52
52
|
}
|
package/schemas/beta/webext.json
CHANGED
|
@@ -15206,7 +15206,8 @@
|
|
|
15206
15206
|
"s390x",
|
|
15207
15207
|
"sparc64",
|
|
15208
15208
|
"x86-32",
|
|
15209
|
-
"x86-64"
|
|
15209
|
+
"x86-64",
|
|
15210
|
+
"noarch"
|
|
15210
15211
|
],
|
|
15211
15212
|
"allowedContexts": [
|
|
15212
15213
|
"content",
|
|
@@ -16028,6 +16029,65 @@
|
|
|
16028
16029
|
"description": "Details specifying the target into which to inject the CSS."
|
|
16029
16030
|
}
|
|
16030
16031
|
}
|
|
16032
|
+
},
|
|
16033
|
+
{
|
|
16034
|
+
"id": "ContentScriptFilter",
|
|
16035
|
+
"type": "object",
|
|
16036
|
+
"properties": {
|
|
16037
|
+
"ids": {
|
|
16038
|
+
"type": "array",
|
|
16039
|
+
"optional": true,
|
|
16040
|
+
"description": "The IDs of specific scripts to retrieve with <code>getRegisteredContentScripts()</code> or to unregister with <code>unregisterContentScripts()</code>.",
|
|
16041
|
+
"items": {
|
|
16042
|
+
"type": "string"
|
|
16043
|
+
}
|
|
16044
|
+
}
|
|
16045
|
+
}
|
|
16046
|
+
},
|
|
16047
|
+
{
|
|
16048
|
+
"id": "RegisteredContentScript",
|
|
16049
|
+
"type": "object",
|
|
16050
|
+
"properties": {
|
|
16051
|
+
"allFrames": {
|
|
16052
|
+
"type": "boolean",
|
|
16053
|
+
"optional": true,
|
|
16054
|
+
"description": "If specified true, it will inject into all frames, even if the frame is not the top-most frame in the tab. Each frame is checked independently for URL requirements; it will not inject into child frames if the URL requirements are not met. Defaults to false, meaning that only the top frame is matched."
|
|
16055
|
+
},
|
|
16056
|
+
"excludeMatches": {
|
|
16057
|
+
"type": "array",
|
|
16058
|
+
"optional": true,
|
|
16059
|
+
"description": "Excludes pages that this content script would otherwise be injected into.",
|
|
16060
|
+
"items": {
|
|
16061
|
+
"type": "string"
|
|
16062
|
+
}
|
|
16063
|
+
},
|
|
16064
|
+
"id": {
|
|
16065
|
+
"type": "string",
|
|
16066
|
+
"description": "The id of the content script, specified in the API call."
|
|
16067
|
+
},
|
|
16068
|
+
"js": {
|
|
16069
|
+
"type": "array",
|
|
16070
|
+
"optional": true,
|
|
16071
|
+
"description": "The list of JavaScript files to be injected into matching pages. These are injected in the order they appear in this array.",
|
|
16072
|
+
"items": {
|
|
16073
|
+
"$ref": "manifest.ExtensionURL"
|
|
16074
|
+
}
|
|
16075
|
+
},
|
|
16076
|
+
"matches": {
|
|
16077
|
+
"type": "array",
|
|
16078
|
+
"optional": true,
|
|
16079
|
+
"description": "Specifies which pages this content script will be injected into. Must be specified for <code>registerContentScripts()</code>.",
|
|
16080
|
+
"items": {
|
|
16081
|
+
"type": "string"
|
|
16082
|
+
}
|
|
16083
|
+
},
|
|
16084
|
+
"runAt": {
|
|
16085
|
+
"$ref": "extensionTypes.RunAt",
|
|
16086
|
+
"optional": true,
|
|
16087
|
+
"default": "document_idle",
|
|
16088
|
+
"description": "Specifies when JavaScript files are injected into the web page. The preferred and default value is <code>document_idle</code>."
|
|
16089
|
+
}
|
|
16090
|
+
}
|
|
16031
16091
|
}
|
|
16032
16092
|
],
|
|
16033
16093
|
"functions": [
|
|
@@ -16095,6 +16155,76 @@
|
|
|
16095
16155
|
"parameters": []
|
|
16096
16156
|
}
|
|
16097
16157
|
]
|
|
16158
|
+
},
|
|
16159
|
+
{
|
|
16160
|
+
"name": "registerContentScripts",
|
|
16161
|
+
"type": "function",
|
|
16162
|
+
"description": "Registers one or more content scripts for this extension.",
|
|
16163
|
+
"async": "callback",
|
|
16164
|
+
"parameters": [
|
|
16165
|
+
{
|
|
16166
|
+
"name": "scripts",
|
|
16167
|
+
"type": "array",
|
|
16168
|
+
"description": "Contains a list of scripts to be registered. If there are errors during script parsing/file validation, or if the IDs specified already exist, then no scripts are registered.",
|
|
16169
|
+
"items": {
|
|
16170
|
+
"$ref": "RegisteredContentScript"
|
|
16171
|
+
}
|
|
16172
|
+
},
|
|
16173
|
+
{
|
|
16174
|
+
"name": "callback",
|
|
16175
|
+
"type": "function",
|
|
16176
|
+
"description": "Invoked upon completion of the registration.",
|
|
16177
|
+
"parameters": []
|
|
16178
|
+
}
|
|
16179
|
+
]
|
|
16180
|
+
},
|
|
16181
|
+
{
|
|
16182
|
+
"name": "getRegisteredContentScripts",
|
|
16183
|
+
"type": "function",
|
|
16184
|
+
"description": "Returns all dynamically registered content scripts for this extension that match the given filter.",
|
|
16185
|
+
"async": "callback",
|
|
16186
|
+
"parameters": [
|
|
16187
|
+
{
|
|
16188
|
+
"name": "filter",
|
|
16189
|
+
"$ref": "ContentScriptFilter",
|
|
16190
|
+
"optional": true,
|
|
16191
|
+
"description": "An object to filter the extension's dynamically registered scripts."
|
|
16192
|
+
},
|
|
16193
|
+
{
|
|
16194
|
+
"name": "callback",
|
|
16195
|
+
"type": "function",
|
|
16196
|
+
"description": "The resulting array contains the registered content scripts.",
|
|
16197
|
+
"parameters": [
|
|
16198
|
+
{
|
|
16199
|
+
"name": "scripts",
|
|
16200
|
+
"type": "array",
|
|
16201
|
+
"items": {
|
|
16202
|
+
"$ref": "RegisteredContentScript"
|
|
16203
|
+
}
|
|
16204
|
+
}
|
|
16205
|
+
]
|
|
16206
|
+
}
|
|
16207
|
+
]
|
|
16208
|
+
},
|
|
16209
|
+
{
|
|
16210
|
+
"name": "unregisterContentScripts",
|
|
16211
|
+
"type": "function",
|
|
16212
|
+
"description": "Unregisters one or more content scripts for this extension.",
|
|
16213
|
+
"async": "callback",
|
|
16214
|
+
"parameters": [
|
|
16215
|
+
{
|
|
16216
|
+
"name": "filter",
|
|
16217
|
+
"$ref": "ContentScriptFilter",
|
|
16218
|
+
"optional": true,
|
|
16219
|
+
"description": "If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered."
|
|
16220
|
+
},
|
|
16221
|
+
{
|
|
16222
|
+
"name": "callback",
|
|
16223
|
+
"type": "function",
|
|
16224
|
+
"description": "Invoked upon completion of the unregistration.",
|
|
16225
|
+
"parameters": []
|
|
16226
|
+
}
|
|
16227
|
+
]
|
|
16098
16228
|
}
|
|
16099
16229
|
]
|
|
16100
16230
|
}
|
|
@@ -16037,7 +16037,7 @@
|
|
|
16037
16037
|
"ids": {
|
|
16038
16038
|
"type": "array",
|
|
16039
16039
|
"optional": true,
|
|
16040
|
-
"description": "The IDs of specific scripts to retrieve with <code>getRegisteredContentScripts()</code>.",
|
|
16040
|
+
"description": "The IDs of specific scripts to retrieve with <code>getRegisteredContentScripts()</code> or to unregister with <code>unregisterContentScripts()</code>.",
|
|
16041
16041
|
"items": {
|
|
16042
16042
|
"type": "string"
|
|
16043
16043
|
}
|
|
@@ -16205,6 +16205,26 @@
|
|
|
16205
16205
|
]
|
|
16206
16206
|
}
|
|
16207
16207
|
]
|
|
16208
|
+
},
|
|
16209
|
+
{
|
|
16210
|
+
"name": "unregisterContentScripts",
|
|
16211
|
+
"type": "function",
|
|
16212
|
+
"description": "Unregisters one or more content scripts for this extension.",
|
|
16213
|
+
"async": "callback",
|
|
16214
|
+
"parameters": [
|
|
16215
|
+
{
|
|
16216
|
+
"name": "filter",
|
|
16217
|
+
"$ref": "ContentScriptFilter",
|
|
16218
|
+
"optional": true,
|
|
16219
|
+
"description": "If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered."
|
|
16220
|
+
},
|
|
16221
|
+
{
|
|
16222
|
+
"name": "callback",
|
|
16223
|
+
"type": "function",
|
|
16224
|
+
"description": "Invoked upon completion of the unregistration.",
|
|
16225
|
+
"parameters": []
|
|
16226
|
+
}
|
|
16227
|
+
]
|
|
16208
16228
|
}
|
|
16209
16229
|
]
|
|
16210
16230
|
}
|