webext-schema 2.3.0 → 2.3.3
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/modules/browser.js +13 -6
- package/package.json +2 -2
- package/schemas/release/webext.json +90 -7
package/modules/browser.js
CHANGED
|
@@ -254,9 +254,11 @@ export const getEnabledTheme = async () => {
|
|
|
254
254
|
const { management } = browser;
|
|
255
255
|
try {
|
|
256
256
|
const arr = await management.getAll();
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
if (Array.isArray(arr) && arr.length) {
|
|
258
|
+
res = arr.filter(info =>
|
|
259
|
+
info.type && info.type === 'theme' && info.enabled && info
|
|
260
|
+
);
|
|
261
|
+
}
|
|
260
262
|
} catch (e) {
|
|
261
263
|
logErr(e);
|
|
262
264
|
}
|
|
@@ -297,9 +299,14 @@ export const getExternalExtensions = async () => {
|
|
|
297
299
|
let res;
|
|
298
300
|
if (isGranted) {
|
|
299
301
|
const { management } = browser;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
302
|
+
try {
|
|
303
|
+
const arr = await management.getAll();
|
|
304
|
+
if (Array.isArray(arr) && arr.length) {
|
|
305
|
+
res =
|
|
306
|
+
arr.filter(info => info.type && info.type === 'extension' && info);
|
|
307
|
+
}
|
|
308
|
+
} catch (e) {
|
|
309
|
+
logErr(e);
|
|
303
310
|
}
|
|
304
311
|
}
|
|
305
312
|
return res || null;
|
package/package.json
CHANGED
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"eslint": "^8.14.0",
|
|
42
42
|
"eslint-config-standard": "^17.0.0",
|
|
43
43
|
"eslint-plugin-import": "^2.26.0",
|
|
44
|
-
"eslint-plugin-jsdoc": "^39.2.
|
|
44
|
+
"eslint-plugin-jsdoc": "^39.2.8",
|
|
45
45
|
"eslint-plugin-node": "^11.1.0",
|
|
46
46
|
"eslint-plugin-promise": "^6.0.0",
|
|
47
47
|
"mocha": "^9.2.2",
|
|
48
48
|
"nock": "^13.2.4",
|
|
49
49
|
"npm-run-all": "^4.1.5"
|
|
50
50
|
},
|
|
51
|
-
"version": "2.3.
|
|
51
|
+
"version": "2.3.3"
|
|
52
52
|
}
|
|
@@ -5000,6 +5000,11 @@
|
|
|
5000
5000
|
"type": "string",
|
|
5001
5001
|
"optional": true,
|
|
5002
5002
|
"description": "The title used for display if the tab is created in discarded mode."
|
|
5003
|
+
},
|
|
5004
|
+
"muted": {
|
|
5005
|
+
"type": "boolean",
|
|
5006
|
+
"optional": true,
|
|
5007
|
+
"description": "Whether the tab should be muted when created."
|
|
5003
5008
|
}
|
|
5004
5009
|
}
|
|
5005
5010
|
},
|
|
@@ -13018,6 +13023,11 @@
|
|
|
13018
13023
|
}
|
|
13019
13024
|
]
|
|
13020
13025
|
},
|
|
13026
|
+
"granted_host_permissions": {
|
|
13027
|
+
"type": "boolean",
|
|
13028
|
+
"optional": true,
|
|
13029
|
+
"default": false
|
|
13030
|
+
},
|
|
13021
13031
|
"host_permissions": {
|
|
13022
13032
|
"min_manifest_version": 3,
|
|
13023
13033
|
"type": "array",
|
|
@@ -14493,9 +14503,6 @@
|
|
|
14493
14503
|
"permissions.json": [
|
|
14494
14504
|
{
|
|
14495
14505
|
"namespace": "permissions",
|
|
14496
|
-
"permissions": [
|
|
14497
|
-
"manifest:optional_permissions"
|
|
14498
|
-
],
|
|
14499
14506
|
"types": [
|
|
14500
14507
|
{
|
|
14501
14508
|
"id": "Permissions",
|
|
@@ -15337,7 +15344,6 @@
|
|
|
15337
15344
|
"functions": [
|
|
15338
15345
|
{
|
|
15339
15346
|
"name": "getBackgroundPage",
|
|
15340
|
-
"max_manifest_version": 2,
|
|
15341
15347
|
"type": "function",
|
|
15342
15348
|
"description": "Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set.",
|
|
15343
15349
|
"async": "callback",
|
|
@@ -15748,13 +15754,11 @@
|
|
|
15748
15754
|
},
|
|
15749
15755
|
{
|
|
15750
15756
|
"name": "onSuspend",
|
|
15751
|
-
"unsupported": true,
|
|
15752
15757
|
"type": "function",
|
|
15753
15758
|
"description": "Sent to the event page just before it is unloaded. This gives the extension opportunity to do some clean up. Note that since the page is unloading, any asynchronous operations started while handling this event are not guaranteed to complete. If more activity for the event page occurs before it gets unloaded the onSuspendCanceled event will be sent and the page won't be unloaded. "
|
|
15754
15759
|
},
|
|
15755
15760
|
{
|
|
15756
15761
|
"name": "onSuspendCanceled",
|
|
15757
|
-
"unsupported": true,
|
|
15758
15762
|
"type": "function",
|
|
15759
15763
|
"description": "Sent after onSuspend to indicate that the app won't be unloaded after all."
|
|
15760
15764
|
},
|
|
@@ -15943,6 +15947,10 @@
|
|
|
15943
15947
|
"target": {
|
|
15944
15948
|
"$ref": "InjectionTarget",
|
|
15945
15949
|
"description": "Details specifying the target into which to inject the script."
|
|
15950
|
+
},
|
|
15951
|
+
"world": {
|
|
15952
|
+
"$ref": "ExecutionWorld",
|
|
15953
|
+
"optional": true
|
|
15946
15954
|
}
|
|
15947
15955
|
}
|
|
15948
15956
|
},
|
|
@@ -16044,6 +16052,14 @@
|
|
|
16044
16052
|
}
|
|
16045
16053
|
}
|
|
16046
16054
|
},
|
|
16055
|
+
{
|
|
16056
|
+
"id": "ExecutionWorld",
|
|
16057
|
+
"type": "string",
|
|
16058
|
+
"enum": [
|
|
16059
|
+
"ISOLATED"
|
|
16060
|
+
],
|
|
16061
|
+
"description": "The JavaScript world for a script to execute within. We currently only support the <code>'ISOLATED'</code> world."
|
|
16062
|
+
},
|
|
16047
16063
|
{
|
|
16048
16064
|
"id": "RegisteredContentScript",
|
|
16049
16065
|
"type": "object",
|
|
@@ -16084,8 +16100,22 @@
|
|
|
16084
16100
|
"runAt": {
|
|
16085
16101
|
"$ref": "extensionTypes.RunAt",
|
|
16086
16102
|
"optional": true,
|
|
16087
|
-
"default": "document_idle",
|
|
16088
16103
|
"description": "Specifies when JavaScript files are injected into the web page. The preferred and default value is <code>document_idle</code>."
|
|
16104
|
+
},
|
|
16105
|
+
"persistAcrossSessions": {
|
|
16106
|
+
"type": "boolean",
|
|
16107
|
+
"enum": [
|
|
16108
|
+
false
|
|
16109
|
+
],
|
|
16110
|
+
"description": "Specifies if this content script will persist into future sessions. This is currently NOT supported."
|
|
16111
|
+
},
|
|
16112
|
+
"css": {
|
|
16113
|
+
"type": "array",
|
|
16114
|
+
"optional": true,
|
|
16115
|
+
"description": "The list of CSS files to be injected into matching pages. These are injected in the order they appear in this array.",
|
|
16116
|
+
"items": {
|
|
16117
|
+
"$ref": "manifest.ExtensionURL"
|
|
16118
|
+
}
|
|
16089
16119
|
}
|
|
16090
16120
|
}
|
|
16091
16121
|
}
|
|
@@ -16225,6 +16255,39 @@
|
|
|
16225
16255
|
"parameters": []
|
|
16226
16256
|
}
|
|
16227
16257
|
]
|
|
16258
|
+
},
|
|
16259
|
+
{
|
|
16260
|
+
"name": "updateContentScripts",
|
|
16261
|
+
"type": "function",
|
|
16262
|
+
"description": "Updates one or more content scripts for this extension.",
|
|
16263
|
+
"async": "callback",
|
|
16264
|
+
"parameters": [
|
|
16265
|
+
{
|
|
16266
|
+
"name": "scripts",
|
|
16267
|
+
"type": "array",
|
|
16268
|
+
"description": "Contains a list of scripts to be updated. If there are errors during script parsing/file validation, or if the IDs specified do not already exist, then no scripts are updated.",
|
|
16269
|
+
"items": {
|
|
16270
|
+
"type": "object",
|
|
16271
|
+
"$import": "RegisteredContentScript",
|
|
16272
|
+
"properties": {
|
|
16273
|
+
"persistAcrossSessions": {
|
|
16274
|
+
"type": "boolean",
|
|
16275
|
+
"optional": true,
|
|
16276
|
+
"enum": [
|
|
16277
|
+
false
|
|
16278
|
+
],
|
|
16279
|
+
"description": "Specifies if this content script will persist into future sessions. This is currently NOT supported."
|
|
16280
|
+
}
|
|
16281
|
+
}
|
|
16282
|
+
}
|
|
16283
|
+
},
|
|
16284
|
+
{
|
|
16285
|
+
"name": "callback",
|
|
16286
|
+
"type": "function",
|
|
16287
|
+
"description": "Invoked when scripts have been updated.",
|
|
16288
|
+
"parameters": []
|
|
16289
|
+
}
|
|
16290
|
+
]
|
|
16228
16291
|
}
|
|
16229
16292
|
]
|
|
16230
16293
|
}
|
|
@@ -17804,6 +17867,26 @@
|
|
|
17804
17867
|
},
|
|
17805
17868
|
"maxItems": 15,
|
|
17806
17869
|
"optional": true
|
|
17870
|
+
},
|
|
17871
|
+
"color_scheme": {
|
|
17872
|
+
"optional": true,
|
|
17873
|
+
"type": "string",
|
|
17874
|
+
"enum": [
|
|
17875
|
+
"auto",
|
|
17876
|
+
"light",
|
|
17877
|
+
"dark",
|
|
17878
|
+
"system"
|
|
17879
|
+
]
|
|
17880
|
+
},
|
|
17881
|
+
"content_color_scheme": {
|
|
17882
|
+
"optional": true,
|
|
17883
|
+
"type": "string",
|
|
17884
|
+
"enum": [
|
|
17885
|
+
"auto",
|
|
17886
|
+
"light",
|
|
17887
|
+
"dark",
|
|
17888
|
+
"system"
|
|
17889
|
+
]
|
|
17807
17890
|
}
|
|
17808
17891
|
},
|
|
17809
17892
|
"additionalProperties": {
|