webext-schema 4.1.1 → 4.2.0
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 +31 -17
- package/package.json +7 -7
- package/schemas/beta/webext.json +4 -2
- package/schemas/central/webext.json +181 -15
- package/schemas/mail/mailext.json +199 -84
package/modules/browser.js
CHANGED
|
@@ -620,31 +620,35 @@ export const setSessionWindowValue = async (key, value, windowId) => {
|
|
|
620
620
|
/**
|
|
621
621
|
* clear storage
|
|
622
622
|
*
|
|
623
|
+
* @param {string} area - storage area
|
|
623
624
|
* @returns {void}
|
|
624
625
|
*/
|
|
625
|
-
export const clearStorage = async () => {
|
|
626
|
+
export const clearStorage = async (area = 'local') => {
|
|
626
627
|
const isGranted = await isPermissionGranted({
|
|
627
628
|
permissions: ['storage']
|
|
628
629
|
});
|
|
629
|
-
|
|
630
|
+
const areas = ['local', 'session', 'sync'];
|
|
631
|
+
if (isGranted && areas.includes(area)) {
|
|
630
632
|
const { storage } = browser;
|
|
631
|
-
await storage
|
|
633
|
+
await storage[area]?.clear();
|
|
632
634
|
}
|
|
633
635
|
};
|
|
634
636
|
|
|
635
637
|
/**
|
|
636
638
|
* get all storage
|
|
637
639
|
*
|
|
640
|
+
* @param {string} area - storage area
|
|
638
641
|
* @returns {object} - stored data
|
|
639
642
|
*/
|
|
640
|
-
export const getAllStorage = async () => {
|
|
643
|
+
export const getAllStorage = async (area = 'local') => {
|
|
641
644
|
const isGranted = await isPermissionGranted({
|
|
642
645
|
permissions: ['storage']
|
|
643
646
|
});
|
|
647
|
+
const areas = ['local', 'managed', 'session', 'sync'];
|
|
644
648
|
let data;
|
|
645
|
-
if (isGranted) {
|
|
649
|
+
if (isGranted && areas.includes(area)) {
|
|
646
650
|
const { storage } = browser;
|
|
647
|
-
data = await storage
|
|
651
|
+
data = await storage[area]?.get();
|
|
648
652
|
}
|
|
649
653
|
return data || null;
|
|
650
654
|
};
|
|
@@ -653,16 +657,18 @@ export const getAllStorage = async () => {
|
|
|
653
657
|
* get storage
|
|
654
658
|
*
|
|
655
659
|
* @param {*} key - key
|
|
660
|
+
* @param {string} area - storage area
|
|
656
661
|
* @returns {object} - stored data
|
|
657
662
|
*/
|
|
658
|
-
export const getStorage = async key => {
|
|
663
|
+
export const getStorage = async (key, area = 'local') => {
|
|
659
664
|
const isGranted = await isPermissionGranted({
|
|
660
665
|
permissions: ['storage']
|
|
661
666
|
});
|
|
667
|
+
const areas = ['local', 'managed', 'session', 'sync'];
|
|
662
668
|
let data;
|
|
663
|
-
if (isGranted) {
|
|
669
|
+
if (isGranted && areas.includes(area)) {
|
|
664
670
|
const { storage } = browser;
|
|
665
|
-
data = await storage
|
|
671
|
+
data = await storage[area]?.get(key);
|
|
666
672
|
}
|
|
667
673
|
return data || null;
|
|
668
674
|
};
|
|
@@ -671,15 +677,17 @@ export const getStorage = async key => {
|
|
|
671
677
|
* remove storage
|
|
672
678
|
*
|
|
673
679
|
* @param {*} key - key
|
|
680
|
+
* @param {string} area - storage area
|
|
674
681
|
* @returns {void}
|
|
675
682
|
*/
|
|
676
|
-
export const removeStorage = async key => {
|
|
683
|
+
export const removeStorage = async (key, area = 'local') => {
|
|
677
684
|
const isGranted = await isPermissionGranted({
|
|
678
685
|
permissions: ['storage']
|
|
679
686
|
});
|
|
680
|
-
|
|
687
|
+
const areas = ['local', 'session', 'sync'];
|
|
688
|
+
if (isGranted && areas.includes(area)) {
|
|
681
689
|
const { storage } = browser;
|
|
682
|
-
await storage
|
|
690
|
+
await storage[area]?.remove(key);
|
|
683
691
|
}
|
|
684
692
|
};
|
|
685
693
|
|
|
@@ -687,15 +695,17 @@ export const removeStorage = async key => {
|
|
|
687
695
|
* set storage
|
|
688
696
|
*
|
|
689
697
|
* @param {object} obj - object to store
|
|
698
|
+
* @param {string} area - storage area
|
|
690
699
|
* @returns {void}
|
|
691
700
|
*/
|
|
692
|
-
export const setStorage = async obj => {
|
|
701
|
+
export const setStorage = async (obj, area = 'local') => {
|
|
693
702
|
const isGranted = await isPermissionGranted({
|
|
694
703
|
permissions: ['storage']
|
|
695
704
|
});
|
|
696
|
-
|
|
705
|
+
const areas = ['local', 'session', 'sync'];
|
|
706
|
+
if (isGranted && obj && areas.includes(area)) {
|
|
697
707
|
const { storage } = browser;
|
|
698
|
-
await storage
|
|
708
|
+
await storage[area]?.set(obj);
|
|
699
709
|
}
|
|
700
710
|
};
|
|
701
711
|
|
|
@@ -844,8 +854,12 @@ export const getActiveTabId = async windowId => {
|
|
|
844
854
|
if (!Number.isInteger(windowId)) {
|
|
845
855
|
windowId = windows.WINDOW_ID_CURRENT;
|
|
846
856
|
}
|
|
847
|
-
const
|
|
848
|
-
|
|
857
|
+
const tab = await getActiveTab(windowId);
|
|
858
|
+
let tabId;
|
|
859
|
+
if (tab) {
|
|
860
|
+
tabId = tab.id;
|
|
861
|
+
}
|
|
862
|
+
return Number.isInteger(tabId) ? tabId : null;
|
|
849
863
|
};
|
|
850
864
|
|
|
851
865
|
/**
|
package/package.json
CHANGED
|
@@ -29,24 +29,24 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"camelize": "^1.0.0",
|
|
32
|
-
"commander": "^9.
|
|
32
|
+
"commander": "^9.4.0",
|
|
33
33
|
"decamelize": "^6.0.0",
|
|
34
34
|
"json5": "^2.2.1",
|
|
35
|
-
"node-fetch": "^3.2.
|
|
35
|
+
"node-fetch": "^3.2.10",
|
|
36
36
|
"sinon": "^14.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"c8": "^7.
|
|
39
|
+
"c8": "^7.12.0",
|
|
40
40
|
"chai": "^4.3.6",
|
|
41
|
-
"eslint": "^8.
|
|
41
|
+
"eslint": "^8.22.0",
|
|
42
42
|
"eslint-config-standard": "^17.0.0",
|
|
43
43
|
"eslint-plugin-import": "^2.26.0",
|
|
44
|
-
"eslint-plugin-jsdoc": "^39.3.
|
|
44
|
+
"eslint-plugin-jsdoc": "^39.3.6",
|
|
45
45
|
"eslint-plugin-node": "^11.1.0",
|
|
46
46
|
"eslint-plugin-promise": "^6.0.0",
|
|
47
47
|
"mocha": "^10.0.0",
|
|
48
|
-
"nock": "^13.2.
|
|
48
|
+
"nock": "^13.2.9",
|
|
49
49
|
"npm-run-all": "^4.1.5"
|
|
50
50
|
},
|
|
51
|
-
"version": "4.
|
|
51
|
+
"version": "4.2.0"
|
|
52
52
|
}
|
package/schemas/beta/webext.json
CHANGED
|
@@ -11587,7 +11587,6 @@
|
|
|
11587
11587
|
"screenshots",
|
|
11588
11588
|
"seqstyle",
|
|
11589
11589
|
"stackwalk",
|
|
11590
|
-
"jstracer",
|
|
11591
11590
|
"jsallocations",
|
|
11592
11591
|
"nostacksampling",
|
|
11593
11592
|
"preferencereads",
|
|
@@ -11601,6 +11600,7 @@
|
|
|
11601
11600
|
"markersallthreads",
|
|
11602
11601
|
"unregisteredthreads",
|
|
11603
11602
|
"processcpu",
|
|
11603
|
+
"power",
|
|
11604
11604
|
"responsiveness"
|
|
11605
11605
|
]
|
|
11606
11606
|
},
|
|
@@ -12892,7 +12892,7 @@
|
|
|
12892
12892
|
"matches": {
|
|
12893
12893
|
"type": "array",
|
|
12894
12894
|
"items": {
|
|
12895
|
-
"$ref": "
|
|
12895
|
+
"$ref": "MatchPattern"
|
|
12896
12896
|
}
|
|
12897
12897
|
}
|
|
12898
12898
|
}
|
|
@@ -19320,6 +19320,8 @@
|
|
|
19320
19320
|
"fingerprinting_content",
|
|
19321
19321
|
"cryptomining",
|
|
19322
19322
|
"cryptomining_content",
|
|
19323
|
+
"emailtracking",
|
|
19324
|
+
"emailtracking_content",
|
|
19323
19325
|
"tracking",
|
|
19324
19326
|
"tracking_ad",
|
|
19325
19327
|
"tracking_analytics",
|
|
@@ -7000,14 +7000,12 @@
|
|
|
7000
7000
|
"optional": true,
|
|
7001
7001
|
"choices": [
|
|
7002
7002
|
{
|
|
7003
|
-
"type": "string"
|
|
7004
|
-
"format": "relativeUrl"
|
|
7003
|
+
"type": "string"
|
|
7005
7004
|
},
|
|
7006
7005
|
{
|
|
7007
7006
|
"type": "array",
|
|
7008
7007
|
"items": {
|
|
7009
|
-
"type": "string"
|
|
7010
|
-
"format": "relativeUrl"
|
|
7008
|
+
"type": "string"
|
|
7011
7009
|
}
|
|
7012
7010
|
}
|
|
7013
7011
|
]
|
|
@@ -9622,6 +9620,154 @@
|
|
|
9622
9620
|
]
|
|
9623
9621
|
}
|
|
9624
9622
|
],
|
|
9623
|
+
"declarative_net_request.json": [
|
|
9624
|
+
{
|
|
9625
|
+
"namespace": "manifest",
|
|
9626
|
+
"types": [
|
|
9627
|
+
{
|
|
9628
|
+
"$extend": "Permission",
|
|
9629
|
+
"choices": [
|
|
9630
|
+
{
|
|
9631
|
+
"type": "string",
|
|
9632
|
+
"enum": [
|
|
9633
|
+
"declarativeNetRequest"
|
|
9634
|
+
],
|
|
9635
|
+
"min_manifest_version": 3
|
|
9636
|
+
}
|
|
9637
|
+
]
|
|
9638
|
+
},
|
|
9639
|
+
{
|
|
9640
|
+
"$extend": "PermissionNoPrompt",
|
|
9641
|
+
"choices": [
|
|
9642
|
+
{
|
|
9643
|
+
"type": "string",
|
|
9644
|
+
"enum": [
|
|
9645
|
+
"declarativeNetRequestFeedback",
|
|
9646
|
+
"declarativeNetRequestWithHostAccess"
|
|
9647
|
+
],
|
|
9648
|
+
"min_manifest_version": 3
|
|
9649
|
+
}
|
|
9650
|
+
]
|
|
9651
|
+
}
|
|
9652
|
+
]
|
|
9653
|
+
},
|
|
9654
|
+
{
|
|
9655
|
+
"namespace": "declarativeNetRequest",
|
|
9656
|
+
"description": "Use the declarativeNetRequest API to block or modify network requests by specifying declarative rules.",
|
|
9657
|
+
"permissions": [
|
|
9658
|
+
"declarativeNetRequest",
|
|
9659
|
+
"declarativeNetRequestWithHostAccess"
|
|
9660
|
+
],
|
|
9661
|
+
"types": [
|
|
9662
|
+
{
|
|
9663
|
+
"id": "ResourceType",
|
|
9664
|
+
"type": "string",
|
|
9665
|
+
"description": "How the requested resource will be used. Comparable to the webRequest.ResourceType type.",
|
|
9666
|
+
"enum": [
|
|
9667
|
+
"main_frame",
|
|
9668
|
+
"sub_frame",
|
|
9669
|
+
"stylesheet",
|
|
9670
|
+
"script",
|
|
9671
|
+
"image",
|
|
9672
|
+
"object",
|
|
9673
|
+
"object_subrequest",
|
|
9674
|
+
"xmlhttprequest",
|
|
9675
|
+
"xslt",
|
|
9676
|
+
"ping",
|
|
9677
|
+
"beacon",
|
|
9678
|
+
"xml_dtd",
|
|
9679
|
+
"font",
|
|
9680
|
+
"media",
|
|
9681
|
+
"websocket",
|
|
9682
|
+
"csp_report",
|
|
9683
|
+
"imageset",
|
|
9684
|
+
"web_manifest",
|
|
9685
|
+
"speculative",
|
|
9686
|
+
"other"
|
|
9687
|
+
]
|
|
9688
|
+
},
|
|
9689
|
+
{
|
|
9690
|
+
"id": "MatchedRule",
|
|
9691
|
+
"type": "object",
|
|
9692
|
+
"properties": {
|
|
9693
|
+
"ruleId": {
|
|
9694
|
+
"type": "integer",
|
|
9695
|
+
"description": "A matching rule's ID."
|
|
9696
|
+
},
|
|
9697
|
+
"rulesetId": {
|
|
9698
|
+
"type": "string",
|
|
9699
|
+
"description": "ID of the Ruleset this rule belongs to."
|
|
9700
|
+
}
|
|
9701
|
+
}
|
|
9702
|
+
}
|
|
9703
|
+
],
|
|
9704
|
+
"functions": [
|
|
9705
|
+
{
|
|
9706
|
+
"name": "testMatchOutcome",
|
|
9707
|
+
"type": "function",
|
|
9708
|
+
"description": "Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request.",
|
|
9709
|
+
"permissions": [
|
|
9710
|
+
"declarativeNetRequestFeedback"
|
|
9711
|
+
],
|
|
9712
|
+
"async": "callback",
|
|
9713
|
+
"parameters": [
|
|
9714
|
+
{
|
|
9715
|
+
"name": "request",
|
|
9716
|
+
"type": "object",
|
|
9717
|
+
"description": "The details of the request to test.",
|
|
9718
|
+
"properties": {
|
|
9719
|
+
"url": {
|
|
9720
|
+
"type": "string",
|
|
9721
|
+
"description": "The URL of the hypothetical request."
|
|
9722
|
+
},
|
|
9723
|
+
"initiator": {
|
|
9724
|
+
"type": "string",
|
|
9725
|
+
"description": "The initiator URL (if any) for the hypothetical request.",
|
|
9726
|
+
"optional": true
|
|
9727
|
+
},
|
|
9728
|
+
"method": {
|
|
9729
|
+
"type": "string",
|
|
9730
|
+
"description": "Standard HTTP method of the hypothetical request.",
|
|
9731
|
+
"optional": true,
|
|
9732
|
+
"default": "get"
|
|
9733
|
+
},
|
|
9734
|
+
"type": {
|
|
9735
|
+
"$ref": "ResourceType",
|
|
9736
|
+
"description": "The resource type of the hypothetical request."
|
|
9737
|
+
},
|
|
9738
|
+
"tabId": {
|
|
9739
|
+
"type": "integer",
|
|
9740
|
+
"description": "The ID of the tab in which the hypothetical request takes place. Does not need to correspond to a real tab ID. Default is -1, meaning that the request isn't related to a tab.",
|
|
9741
|
+
"optional": true,
|
|
9742
|
+
"default": -1
|
|
9743
|
+
}
|
|
9744
|
+
}
|
|
9745
|
+
},
|
|
9746
|
+
{
|
|
9747
|
+
"name": "callback",
|
|
9748
|
+
"type": "function",
|
|
9749
|
+
"description": "Called with the details of matched rules.",
|
|
9750
|
+
"parameters": [
|
|
9751
|
+
{
|
|
9752
|
+
"name": "result",
|
|
9753
|
+
"type": "object",
|
|
9754
|
+
"properties": {
|
|
9755
|
+
"matchedRules": {
|
|
9756
|
+
"type": "array",
|
|
9757
|
+
"description": "The rules (if any) that match the hypothetical request.",
|
|
9758
|
+
"items": {
|
|
9759
|
+
"$ref": "MatchedRule"
|
|
9760
|
+
}
|
|
9761
|
+
}
|
|
9762
|
+
}
|
|
9763
|
+
}
|
|
9764
|
+
]
|
|
9765
|
+
}
|
|
9766
|
+
]
|
|
9767
|
+
}
|
|
9768
|
+
]
|
|
9769
|
+
}
|
|
9770
|
+
],
|
|
9625
9771
|
"dns.json": [
|
|
9626
9772
|
{
|
|
9627
9773
|
"namespace": "manifest",
|
|
@@ -11579,7 +11725,6 @@
|
|
|
11579
11725
|
"enum": [
|
|
11580
11726
|
"java",
|
|
11581
11727
|
"js",
|
|
11582
|
-
"leaf",
|
|
11583
11728
|
"mainthreadio",
|
|
11584
11729
|
"fileio",
|
|
11585
11730
|
"fileioall",
|
|
@@ -11587,7 +11732,6 @@
|
|
|
11587
11732
|
"screenshots",
|
|
11588
11733
|
"seqstyle",
|
|
11589
11734
|
"stackwalk",
|
|
11590
|
-
"jstracer",
|
|
11591
11735
|
"jsallocations",
|
|
11592
11736
|
"nostacksampling",
|
|
11593
11737
|
"preferencereads",
|
|
@@ -11601,6 +11745,7 @@
|
|
|
11601
11745
|
"markersallthreads",
|
|
11602
11746
|
"unregisteredthreads",
|
|
11603
11747
|
"processcpu",
|
|
11748
|
+
"power",
|
|
11604
11749
|
"responsiveness"
|
|
11605
11750
|
]
|
|
11606
11751
|
},
|
|
@@ -12880,19 +13025,42 @@
|
|
|
12880
13025
|
{
|
|
12881
13026
|
"min_manifest_version": 3,
|
|
12882
13027
|
"type": "array",
|
|
13028
|
+
"postprocess": "webAccessibleMatching",
|
|
13029
|
+
"minItems": 1,
|
|
12883
13030
|
"items": {
|
|
12884
13031
|
"type": "object",
|
|
12885
13032
|
"properties": {
|
|
12886
13033
|
"resources": {
|
|
12887
13034
|
"type": "array",
|
|
13035
|
+
"minItems": 1,
|
|
12888
13036
|
"items": {
|
|
12889
13037
|
"type": "string"
|
|
12890
13038
|
}
|
|
12891
13039
|
},
|
|
12892
13040
|
"matches": {
|
|
13041
|
+
"optional": true,
|
|
12893
13042
|
"type": "array",
|
|
13043
|
+
"minItems": 1,
|
|
12894
13044
|
"items": {
|
|
12895
|
-
"$ref": "
|
|
13045
|
+
"$ref": "MatchPattern"
|
|
13046
|
+
}
|
|
13047
|
+
},
|
|
13048
|
+
"extension_ids": {
|
|
13049
|
+
"optional": true,
|
|
13050
|
+
"type": "array",
|
|
13051
|
+
"minItems": 1,
|
|
13052
|
+
"items": {
|
|
13053
|
+
"choices": [
|
|
13054
|
+
{
|
|
13055
|
+
"$ref": "ExtensionID"
|
|
13056
|
+
},
|
|
13057
|
+
{
|
|
13058
|
+
"type": "string",
|
|
13059
|
+
"enum": [
|
|
13060
|
+
"*"
|
|
13061
|
+
]
|
|
13062
|
+
}
|
|
13063
|
+
]
|
|
12896
13064
|
}
|
|
12897
13065
|
}
|
|
12898
13066
|
}
|
|
@@ -15941,10 +16109,9 @@
|
|
|
15941
16109
|
},
|
|
15942
16110
|
"persistAcrossSessions": {
|
|
15943
16111
|
"type": "boolean",
|
|
15944
|
-
"
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
"description": "Specifies if this content script will persist into future sessions. This is currently NOT supported."
|
|
16112
|
+
"optional": true,
|
|
16113
|
+
"default": true,
|
|
16114
|
+
"description": "Specifies if this content script will persist into future sessions. Defaults to true."
|
|
15948
16115
|
},
|
|
15949
16116
|
"css": {
|
|
15950
16117
|
"type": "array",
|
|
@@ -16110,10 +16277,7 @@
|
|
|
16110
16277
|
"persistAcrossSessions": {
|
|
16111
16278
|
"type": "boolean",
|
|
16112
16279
|
"optional": true,
|
|
16113
|
-
"
|
|
16114
|
-
false
|
|
16115
|
-
],
|
|
16116
|
-
"description": "Specifies if this content script will persist into future sessions. This is currently NOT supported."
|
|
16280
|
+
"description": "Specifies if this content script will persist into future sessions."
|
|
16117
16281
|
}
|
|
16118
16282
|
}
|
|
16119
16283
|
}
|
|
@@ -19320,6 +19484,8 @@
|
|
|
19320
19484
|
"fingerprinting_content",
|
|
19321
19485
|
"cryptomining",
|
|
19322
19486
|
"cryptomining_content",
|
|
19487
|
+
"emailtracking",
|
|
19488
|
+
"emailtracking_content",
|
|
19323
19489
|
"tracking",
|
|
19324
19490
|
"tracking_ad",
|
|
19325
19491
|
"tracking_analytics",
|
|
@@ -3402,7 +3402,7 @@
|
|
|
3402
3402
|
{
|
|
3403
3403
|
"id": "ContactProperties",
|
|
3404
3404
|
"type": "object",
|
|
3405
|
-
"description": "A set of individual properties for a particular contact and
|
|
3405
|
+
"description": "A set of individual properties for a particular contact, and its vCard string. Further information can be found in :ref:`howto_contacts`.",
|
|
3406
3406
|
"patternProperties": {
|
|
3407
3407
|
"^\\w+$": {
|
|
3408
3408
|
"choices": [
|
|
@@ -3991,64 +3991,79 @@
|
|
|
3991
3991
|
{
|
|
3992
3992
|
"namespace": "manifest",
|
|
3993
3993
|
"types": [
|
|
3994
|
+
{
|
|
3995
|
+
"id": "ActionManifest",
|
|
3996
|
+
"type": "object",
|
|
3997
|
+
"additionalProperties": {
|
|
3998
|
+
"$ref": "UnrecognizedProperty"
|
|
3999
|
+
},
|
|
4000
|
+
"properties": {
|
|
4001
|
+
"default_label": {
|
|
4002
|
+
"type": "string",
|
|
4003
|
+
"description": "The label of the action, defaults to its title. Can be set to an empty string to not display any label. If the containing toolbar is configured to display text only, the title will be used as fallback.",
|
|
4004
|
+
"optional": true,
|
|
4005
|
+
"preprocess": "localize"
|
|
4006
|
+
},
|
|
4007
|
+
"default_title": {
|
|
4008
|
+
"type": "string",
|
|
4009
|
+
"description": "The title of the action. This shows up in the tooltip and the label. Defaults to the add-on name.",
|
|
4010
|
+
"optional": true,
|
|
4011
|
+
"preprocess": "localize"
|
|
4012
|
+
},
|
|
4013
|
+
"default_icon": {
|
|
4014
|
+
"$ref": "IconPath",
|
|
4015
|
+
"description": "The icon for the action.",
|
|
4016
|
+
"optional": true
|
|
4017
|
+
},
|
|
4018
|
+
"theme_icons": {
|
|
4019
|
+
"type": "array",
|
|
4020
|
+
"optional": true,
|
|
4021
|
+
"minItems": 1,
|
|
4022
|
+
"items": {
|
|
4023
|
+
"$ref": "ThemeIcons"
|
|
4024
|
+
},
|
|
4025
|
+
"description": "Specifies dark and light icons to be used with themes. The ``light`` icon is used on dark backgrounds and vice versa. **Note:** The default theme uses the ``default_icon`` for light backgrounds (if specified)."
|
|
4026
|
+
},
|
|
4027
|
+
"default_popup": {
|
|
4028
|
+
"type": "string",
|
|
4029
|
+
"format": "relativeUrl",
|
|
4030
|
+
"optional": true,
|
|
4031
|
+
"description": "The html document to be opened as a popup when the user clicks on the action's icon.",
|
|
4032
|
+
"preprocess": "localize"
|
|
4033
|
+
},
|
|
4034
|
+
"browser_style": {
|
|
4035
|
+
"type": "boolean",
|
|
4036
|
+
"optional": true,
|
|
4037
|
+
"description": "Enable browser styles. See the `MDN documentation on browser styles <https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/user_interface/Browser_styles>`__ for more information.",
|
|
4038
|
+
"default": false
|
|
4039
|
+
},
|
|
4040
|
+
"default_area": {
|
|
4041
|
+
"description": "Defines the location the action will appear. The default location is ``maintoolbar``.",
|
|
4042
|
+
"type": "string",
|
|
4043
|
+
"enum": [
|
|
4044
|
+
"maintoolbar",
|
|
4045
|
+
"tabstoolbar"
|
|
4046
|
+
],
|
|
4047
|
+
"optional": true
|
|
4048
|
+
}
|
|
4049
|
+
}
|
|
4050
|
+
},
|
|
4051
|
+
{
|
|
4052
|
+
"$extend": "WebExtensionManifest",
|
|
4053
|
+
"properties": {
|
|
4054
|
+
"action": {
|
|
4055
|
+
"min_manifest_version": 3,
|
|
4056
|
+
"$ref": "ActionManifest",
|
|
4057
|
+
"optional": true
|
|
4058
|
+
}
|
|
4059
|
+
}
|
|
4060
|
+
},
|
|
3994
4061
|
{
|
|
3995
4062
|
"$extend": "WebExtensionManifest",
|
|
3996
4063
|
"properties": {
|
|
3997
4064
|
"browser_action": {
|
|
3998
|
-
"
|
|
3999
|
-
"
|
|
4000
|
-
"$ref": "UnrecognizedProperty"
|
|
4001
|
-
},
|
|
4002
|
-
"properties": {
|
|
4003
|
-
"default_label": {
|
|
4004
|
-
"type": "string",
|
|
4005
|
-
"description": "The label of the browserAction, defaults to its title. Can be set to an empty string to not display any label. If the containing toolbar is configured to display text only, the title will be used as fallback.",
|
|
4006
|
-
"optional": true,
|
|
4007
|
-
"preprocess": "localize"
|
|
4008
|
-
},
|
|
4009
|
-
"default_title": {
|
|
4010
|
-
"type": "string",
|
|
4011
|
-
"description": "The title of the browserAction. This shows up in the tooltip and the label. Defaults to the add-on name.",
|
|
4012
|
-
"optional": true,
|
|
4013
|
-
"preprocess": "localize"
|
|
4014
|
-
},
|
|
4015
|
-
"default_icon": {
|
|
4016
|
-
"$ref": "IconPath",
|
|
4017
|
-
"description": "The icon for the messageDisplayAction.",
|
|
4018
|
-
"optional": true
|
|
4019
|
-
},
|
|
4020
|
-
"theme_icons": {
|
|
4021
|
-
"type": "array",
|
|
4022
|
-
"optional": true,
|
|
4023
|
-
"minItems": 1,
|
|
4024
|
-
"items": {
|
|
4025
|
-
"$ref": "ThemeIcons"
|
|
4026
|
-
},
|
|
4027
|
-
"description": "Specifies dark and light icons to be used with themes. The ``light`` icon is used on dark backgrounds and vice versa. **Note:** The default theme uses the ``default_icon`` for light backgrounds (if specified)."
|
|
4028
|
-
},
|
|
4029
|
-
"default_popup": {
|
|
4030
|
-
"type": "string",
|
|
4031
|
-
"format": "relativeUrl",
|
|
4032
|
-
"optional": true,
|
|
4033
|
-
"description": "The html document to be opened as a popup when the user clicks on the browserAction's icon.",
|
|
4034
|
-
"preprocess": "localize"
|
|
4035
|
-
},
|
|
4036
|
-
"browser_style": {
|
|
4037
|
-
"type": "boolean",
|
|
4038
|
-
"optional": true,
|
|
4039
|
-
"description": "Enable browser styles. See the `MDN documentation on browser styles <https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/user_interface/Browser_styles>`__ for more information.",
|
|
4040
|
-
"default": false
|
|
4041
|
-
},
|
|
4042
|
-
"default_area": {
|
|
4043
|
-
"description": "Defines the location the browserAction will appear. The default location is ``maintoolbar``.",
|
|
4044
|
-
"type": "string",
|
|
4045
|
-
"enum": [
|
|
4046
|
-
"maintoolbar",
|
|
4047
|
-
"tabstoolbar"
|
|
4048
|
-
],
|
|
4049
|
-
"optional": true
|
|
4050
|
-
}
|
|
4051
|
-
},
|
|
4065
|
+
"max_manifest_version": 2,
|
|
4066
|
+
"$ref": "ActionManifest",
|
|
4052
4067
|
"optional": true
|
|
4053
4068
|
}
|
|
4054
4069
|
}
|
|
@@ -4056,11 +4071,13 @@
|
|
|
4056
4071
|
]
|
|
4057
4072
|
},
|
|
4058
4073
|
{
|
|
4059
|
-
"namespace": "
|
|
4060
|
-
"description": "Use
|
|
4074
|
+
"namespace": "action",
|
|
4075
|
+
"description": "Use an action to put an icon in the mail window toolbar. In addition to its icon, an action can also have a tooltip, a badge, and a popup.",
|
|
4061
4076
|
"permissions": [
|
|
4077
|
+
"manifest:action",
|
|
4062
4078
|
"manifest:browser_action"
|
|
4063
4079
|
],
|
|
4080
|
+
"min_manifest_version": 3,
|
|
4064
4081
|
"types": [
|
|
4065
4082
|
{
|
|
4066
4083
|
"id": "Details",
|
|
@@ -4144,7 +4161,7 @@
|
|
|
4144
4161
|
{
|
|
4145
4162
|
"name": "setTitle",
|
|
4146
4163
|
"type": "function",
|
|
4147
|
-
"description": "Sets the title of the
|
|
4164
|
+
"description": "Sets the title of the action. This shows up in the tooltip and the label. Defaults to the add-on name.",
|
|
4148
4165
|
"async": "callback",
|
|
4149
4166
|
"parameters": [
|
|
4150
4167
|
{
|
|
@@ -4161,7 +4178,7 @@
|
|
|
4161
4178
|
"type": "null"
|
|
4162
4179
|
}
|
|
4163
4180
|
],
|
|
4164
|
-
"description": "The string the
|
|
4181
|
+
"description": "The string the action should display as its label and when moused over."
|
|
4165
4182
|
}
|
|
4166
4183
|
}
|
|
4167
4184
|
},
|
|
@@ -4176,7 +4193,7 @@
|
|
|
4176
4193
|
{
|
|
4177
4194
|
"name": "getTitle",
|
|
4178
4195
|
"type": "function",
|
|
4179
|
-
"description": "Gets the title of the
|
|
4196
|
+
"description": "Gets the title of the action.",
|
|
4180
4197
|
"async": "callback",
|
|
4181
4198
|
"parameters": [
|
|
4182
4199
|
{
|
|
@@ -4198,7 +4215,7 @@
|
|
|
4198
4215
|
{
|
|
4199
4216
|
"name": "setLabel",
|
|
4200
4217
|
"type": "function",
|
|
4201
|
-
"description": "Sets the label of the
|
|
4218
|
+
"description": "Sets the label of the action, defaults to its title. Can be set to an empty string to not display any label. If the containing toolbar is configured to display text only, the title will be used as fallback.",
|
|
4202
4219
|
"async": "callback",
|
|
4203
4220
|
"parameters": [
|
|
4204
4221
|
{
|
|
@@ -4215,7 +4232,7 @@
|
|
|
4215
4232
|
"type": "null"
|
|
4216
4233
|
}
|
|
4217
4234
|
],
|
|
4218
|
-
"description": "The string the
|
|
4235
|
+
"description": "The string the action should use as label. Can be set to an empty string to not display any label. If the containing toolbar is configured to display text only, the title will be used as fallback."
|
|
4219
4236
|
}
|
|
4220
4237
|
}
|
|
4221
4238
|
},
|
|
@@ -4230,7 +4247,7 @@
|
|
|
4230
4247
|
{
|
|
4231
4248
|
"name": "getLabel",
|
|
4232
4249
|
"type": "function",
|
|
4233
|
-
"description": "Gets the label of the
|
|
4250
|
+
"description": "Gets the label of the action.",
|
|
4234
4251
|
"async": "callback",
|
|
4235
4252
|
"parameters": [
|
|
4236
4253
|
{
|
|
@@ -4252,7 +4269,7 @@
|
|
|
4252
4269
|
{
|
|
4253
4270
|
"name": "setIcon",
|
|
4254
4271
|
"type": "function",
|
|
4255
|
-
"description": "Sets the icon for the
|
|
4272
|
+
"description": "Sets the icon for the action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the <b>path</b> or the <b>imageData</b> property must be specified.",
|
|
4256
4273
|
"async": "callback",
|
|
4257
4274
|
"parameters": [
|
|
4258
4275
|
{
|
|
@@ -4297,7 +4314,7 @@
|
|
|
4297
4314
|
{
|
|
4298
4315
|
"name": "setPopup",
|
|
4299
4316
|
"type": "function",
|
|
4300
|
-
"description": "Sets the html document to be opened as a popup when the user clicks on the
|
|
4317
|
+
"description": "Sets the html document to be opened as a popup when the user clicks on the action's icon.",
|
|
4301
4318
|
"async": "callback",
|
|
4302
4319
|
"parameters": [
|
|
4303
4320
|
{
|
|
@@ -4329,7 +4346,7 @@
|
|
|
4329
4346
|
{
|
|
4330
4347
|
"name": "getPopup",
|
|
4331
4348
|
"type": "function",
|
|
4332
|
-
"description": "Gets the html document set as the popup for this
|
|
4349
|
+
"description": "Gets the html document set as the popup for this action.",
|
|
4333
4350
|
"async": "callback",
|
|
4334
4351
|
"parameters": [
|
|
4335
4352
|
{
|
|
@@ -4351,7 +4368,7 @@
|
|
|
4351
4368
|
{
|
|
4352
4369
|
"name": "setBadgeText",
|
|
4353
4370
|
"type": "function",
|
|
4354
|
-
"description": "Sets the badge text for the
|
|
4371
|
+
"description": "Sets the badge text for the action. The badge is displayed on top of the icon.",
|
|
4355
4372
|
"async": "callback",
|
|
4356
4373
|
"parameters": [
|
|
4357
4374
|
{
|
|
@@ -4383,7 +4400,7 @@
|
|
|
4383
4400
|
{
|
|
4384
4401
|
"name": "getBadgeText",
|
|
4385
4402
|
"type": "function",
|
|
4386
|
-
"description": "Gets the badge text of the
|
|
4403
|
+
"description": "Gets the badge text of the action. If no tab nor window is specified, the global badge text is returned.",
|
|
4387
4404
|
"async": "callback",
|
|
4388
4405
|
"parameters": [
|
|
4389
4406
|
{
|
|
@@ -4440,7 +4457,7 @@
|
|
|
4440
4457
|
{
|
|
4441
4458
|
"name": "getBadgeBackgroundColor",
|
|
4442
4459
|
"type": "function",
|
|
4443
|
-
"description": "Gets the background color of the
|
|
4460
|
+
"description": "Gets the background color of the action.",
|
|
4444
4461
|
"async": "callback",
|
|
4445
4462
|
"parameters": [
|
|
4446
4463
|
{
|
|
@@ -4462,7 +4479,7 @@
|
|
|
4462
4479
|
{
|
|
4463
4480
|
"name": "enable",
|
|
4464
4481
|
"type": "function",
|
|
4465
|
-
"description": "Enables the
|
|
4482
|
+
"description": "Enables the action for a tab. By default, an action is enabled.",
|
|
4466
4483
|
"async": "callback",
|
|
4467
4484
|
"parameters": [
|
|
4468
4485
|
{
|
|
@@ -4470,7 +4487,7 @@
|
|
|
4470
4487
|
"optional": true,
|
|
4471
4488
|
"name": "tabId",
|
|
4472
4489
|
"minimum": 0,
|
|
4473
|
-
"description": "The id of the tab for which you want to modify the
|
|
4490
|
+
"description": "The id of the tab for which you want to modify the action."
|
|
4474
4491
|
},
|
|
4475
4492
|
{
|
|
4476
4493
|
"type": "function",
|
|
@@ -4483,7 +4500,7 @@
|
|
|
4483
4500
|
{
|
|
4484
4501
|
"name": "disable",
|
|
4485
4502
|
"type": "function",
|
|
4486
|
-
"description": "Disables the
|
|
4503
|
+
"description": "Disables the action for a tab.",
|
|
4487
4504
|
"async": "callback",
|
|
4488
4505
|
"parameters": [
|
|
4489
4506
|
{
|
|
@@ -4491,7 +4508,7 @@
|
|
|
4491
4508
|
"optional": true,
|
|
4492
4509
|
"name": "tabId",
|
|
4493
4510
|
"minimum": 0,
|
|
4494
|
-
"description": "The id of the tab for which you want to modify the
|
|
4511
|
+
"description": "The id of the tab for which you want to modify the action."
|
|
4495
4512
|
},
|
|
4496
4513
|
{
|
|
4497
4514
|
"type": "function",
|
|
@@ -4504,7 +4521,7 @@
|
|
|
4504
4521
|
{
|
|
4505
4522
|
"name": "isEnabled",
|
|
4506
4523
|
"type": "function",
|
|
4507
|
-
"description": "Checks whether the
|
|
4524
|
+
"description": "Checks whether the action is enabled.",
|
|
4508
4525
|
"async": "callback",
|
|
4509
4526
|
"parameters": [
|
|
4510
4527
|
{
|
|
@@ -4536,7 +4553,7 @@
|
|
|
4536
4553
|
{
|
|
4537
4554
|
"name": "onClicked",
|
|
4538
4555
|
"type": "function",
|
|
4539
|
-
"description": "Fired when
|
|
4556
|
+
"description": "Fired when an action icon is clicked. This event will not fire if the action has a popup. This is a user input event handler. For asynchronous listeners some `restrictions <https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/User_actions>`__ apply.",
|
|
4540
4557
|
"parameters": [
|
|
4541
4558
|
{
|
|
4542
4559
|
"name": "tab",
|
|
@@ -4550,6 +4567,15 @@
|
|
|
4550
4567
|
]
|
|
4551
4568
|
}
|
|
4552
4569
|
]
|
|
4570
|
+
},
|
|
4571
|
+
{
|
|
4572
|
+
"namespace": "browserAction",
|
|
4573
|
+
"permissions": [
|
|
4574
|
+
"manifest:action",
|
|
4575
|
+
"manifest:browser_action"
|
|
4576
|
+
],
|
|
4577
|
+
"max_manifest_version": 2,
|
|
4578
|
+
"$import": "action"
|
|
4553
4579
|
}
|
|
4554
4580
|
],
|
|
4555
4581
|
"chrome_settings_overrides.json": [
|
|
@@ -5621,6 +5647,91 @@
|
|
|
5621
5647
|
}
|
|
5622
5648
|
}
|
|
5623
5649
|
},
|
|
5650
|
+
{
|
|
5651
|
+
"name": "onAfterSend",
|
|
5652
|
+
"type": "function",
|
|
5653
|
+
"description": "Fired when sending a message succeeded or failed.",
|
|
5654
|
+
"permissions": [
|
|
5655
|
+
"compose"
|
|
5656
|
+
],
|
|
5657
|
+
"parameters": [
|
|
5658
|
+
{
|
|
5659
|
+
"name": "tab",
|
|
5660
|
+
"$ref": "tabs.Tab"
|
|
5661
|
+
},
|
|
5662
|
+
{
|
|
5663
|
+
"name": "sendInfo",
|
|
5664
|
+
"type": "object",
|
|
5665
|
+
"properties": {
|
|
5666
|
+
"mode": {
|
|
5667
|
+
"type": "string",
|
|
5668
|
+
"description": "The used send mode.",
|
|
5669
|
+
"enum": [
|
|
5670
|
+
"sendNow",
|
|
5671
|
+
"sendLater"
|
|
5672
|
+
]
|
|
5673
|
+
},
|
|
5674
|
+
"error": {
|
|
5675
|
+
"type": "string",
|
|
5676
|
+
"description": "An error description, if sending the message failed.",
|
|
5677
|
+
"optional": true
|
|
5678
|
+
},
|
|
5679
|
+
"headerMessageId": {
|
|
5680
|
+
"type": "string",
|
|
5681
|
+
"description": "The header messageId of the outgoing message. Only included for actually sent messages.",
|
|
5682
|
+
"optional": true
|
|
5683
|
+
},
|
|
5684
|
+
"messages": {
|
|
5685
|
+
"type": "array",
|
|
5686
|
+
"items": {
|
|
5687
|
+
"$ref": "messages.MessageHeader"
|
|
5688
|
+
},
|
|
5689
|
+
"description": "Copies of the sent message. The number of created copies depends on the applied file carbon copy configuration (fcc)."
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5692
|
+
}
|
|
5693
|
+
]
|
|
5694
|
+
},
|
|
5695
|
+
{
|
|
5696
|
+
"name": "onAfterSave",
|
|
5697
|
+
"type": "function",
|
|
5698
|
+
"description": "Fired when saving a message as draft or template succeeded or failed.",
|
|
5699
|
+
"permissions": [
|
|
5700
|
+
"compose"
|
|
5701
|
+
],
|
|
5702
|
+
"parameters": [
|
|
5703
|
+
{
|
|
5704
|
+
"name": "tab",
|
|
5705
|
+
"$ref": "tabs.Tab"
|
|
5706
|
+
},
|
|
5707
|
+
{
|
|
5708
|
+
"name": "saveInfo",
|
|
5709
|
+
"type": "object",
|
|
5710
|
+
"properties": {
|
|
5711
|
+
"mode": {
|
|
5712
|
+
"type": "string",
|
|
5713
|
+
"description": "The used save mode.",
|
|
5714
|
+
"enum": [
|
|
5715
|
+
"draft",
|
|
5716
|
+
"template"
|
|
5717
|
+
]
|
|
5718
|
+
},
|
|
5719
|
+
"error": {
|
|
5720
|
+
"type": "string",
|
|
5721
|
+
"description": "An error description, if saving the message failed.",
|
|
5722
|
+
"optional": true
|
|
5723
|
+
},
|
|
5724
|
+
"messages": {
|
|
5725
|
+
"type": "array",
|
|
5726
|
+
"items": {
|
|
5727
|
+
"$ref": "messages.MessageHeader"
|
|
5728
|
+
},
|
|
5729
|
+
"description": "The saved message(s). The number of saved messages depends on the applied file carbon copy configuration (fcc)."
|
|
5730
|
+
}
|
|
5731
|
+
}
|
|
5732
|
+
}
|
|
5733
|
+
]
|
|
5734
|
+
},
|
|
5624
5735
|
{
|
|
5625
5736
|
"name": "onAttachmentAdded",
|
|
5626
5737
|
"type": "function",
|
|
@@ -9763,19 +9874,19 @@
|
|
|
9763
9874
|
"properties": {
|
|
9764
9875
|
"key": {
|
|
9765
9876
|
"type": "string",
|
|
9766
|
-
"description": "
|
|
9877
|
+
"description": "Unique tag identifier."
|
|
9767
9878
|
},
|
|
9768
9879
|
"tag": {
|
|
9769
9880
|
"type": "string",
|
|
9770
|
-
"description": "Human-readable tag name"
|
|
9881
|
+
"description": "Human-readable tag name."
|
|
9771
9882
|
},
|
|
9772
9883
|
"color": {
|
|
9773
9884
|
"type": "string",
|
|
9774
|
-
"description": "Tag color"
|
|
9885
|
+
"description": "Tag color."
|
|
9775
9886
|
},
|
|
9776
9887
|
"ordinal": {
|
|
9777
9888
|
"type": "string",
|
|
9778
|
-
"description": "Custom sort string (usually empty)"
|
|
9889
|
+
"description": "Custom sort string (usually empty)."
|
|
9779
9890
|
}
|
|
9780
9891
|
}
|
|
9781
9892
|
},
|
|
@@ -10323,7 +10434,7 @@
|
|
|
10323
10434
|
{
|
|
10324
10435
|
"name": "createTag",
|
|
10325
10436
|
"type": "function",
|
|
10326
|
-
"description": "Creates a new message tag. Tagging a message will store the tag's key in the user's message.",
|
|
10437
|
+
"description": "Creates a new message tag. Tagging a message will store the tag's key in the user's message. Throws if the specified tag key is used already.",
|
|
10327
10438
|
"async": true,
|
|
10328
10439
|
"permissions": [
|
|
10329
10440
|
"messagesTags"
|
|
@@ -10332,15 +10443,18 @@
|
|
|
10332
10443
|
{
|
|
10333
10444
|
"type": "string",
|
|
10334
10445
|
"name": "key",
|
|
10446
|
+
"description": "Unique tag identifier (must use only alphanumeric characters).",
|
|
10335
10447
|
"pattern": "^[$a-zA-Z0-9]+$"
|
|
10336
10448
|
},
|
|
10337
10449
|
{
|
|
10338
10450
|
"type": "string",
|
|
10339
|
-
"name": "tag"
|
|
10451
|
+
"name": "tag",
|
|
10452
|
+
"description": "Human-readable tag name."
|
|
10340
10453
|
},
|
|
10341
10454
|
{
|
|
10342
10455
|
"type": "string",
|
|
10343
10456
|
"name": "color",
|
|
10457
|
+
"description": "Tag color in hex format (i.e.: #000080 for navy blue)",
|
|
10344
10458
|
"pattern": "^#[0-9a-f]{6}"
|
|
10345
10459
|
}
|
|
10346
10460
|
]
|
|
@@ -10357,6 +10471,7 @@
|
|
|
10357
10471
|
{
|
|
10358
10472
|
"type": "string",
|
|
10359
10473
|
"name": "key",
|
|
10474
|
+
"description": "Unique tag identifier.",
|
|
10360
10475
|
"pattern": "^[$a-zA-Z0-9]+$"
|
|
10361
10476
|
},
|
|
10362
10477
|
{
|
|
@@ -10365,11 +10480,13 @@
|
|
|
10365
10480
|
"properties": {
|
|
10366
10481
|
"tag": {
|
|
10367
10482
|
"type": "string",
|
|
10368
|
-
"optional": "true"
|
|
10483
|
+
"optional": "true",
|
|
10484
|
+
"description": "Human-readable tag name."
|
|
10369
10485
|
},
|
|
10370
10486
|
"color": {
|
|
10371
10487
|
"type": "string",
|
|
10372
10488
|
"pattern": "^#[0-9a-f]{6}",
|
|
10489
|
+
"description": "Tag color in hex format (i.e.: #000080 for navy blue).",
|
|
10373
10490
|
"optional": "true"
|
|
10374
10491
|
}
|
|
10375
10492
|
}
|
|
@@ -10671,7 +10788,6 @@
|
|
|
10671
10788
|
"panel",
|
|
10672
10789
|
"app",
|
|
10673
10790
|
"devtools",
|
|
10674
|
-
"addressBook",
|
|
10675
10791
|
"messageCompose",
|
|
10676
10792
|
"messageDisplay"
|
|
10677
10793
|
]
|
|
@@ -11503,7 +11619,6 @@
|
|
|
11503
11619
|
"panel",
|
|
11504
11620
|
"app",
|
|
11505
11621
|
"devtools",
|
|
11506
|
-
"addressBook",
|
|
11507
11622
|
"messageCompose",
|
|
11508
11623
|
"messageDisplay"
|
|
11509
11624
|
]
|