Source code

Revision control

Other Tools

1
[
2
{
3
"namespace": "manifest",
4
"permissions": [],
5
"types": [
6
{
7
"id": "ManifestBase",
8
"type": "object",
9
"description": "Common properties for all manifest.json files",
10
"properties": {
11
"manifest_version": {
12
"type": "integer",
13
"minimum": 2,
14
"maximum": 2
15
},
16
17
"applications": {
18
"type": "object",
19
"optional": true,
20
"properties": {
21
"gecko": {
22
"$ref": "FirefoxSpecificProperties",
23
"optional": true
24
}
25
}
26
},
27
28
"browser_specific_settings": {
29
"type": "object",
30
"optional": true,
31
"properties": {
32
"gecko": {
33
"$ref": "FirefoxSpecificProperties",
34
"optional": true
35
},
36
"edge": {
37
"type": "object",
38
"additionalProperties": { "type": "any" },
39
"optional": true
40
}
41
},
42
"additionalProperties": { "$ref": "UnrecognizedProperty" }
43
},
44
45
"name": {
46
"type": "string",
47
"optional": false,
48
"preprocess": "localize"
49
},
50
51
"short_name": {
52
"type": "string",
53
"optional": true,
54
"preprocess": "localize"
55
},
56
57
"description": {
58
"type": "string",
59
"optional": true,
60
"preprocess": "localize"
61
},
62
63
"author": {
64
"type": "string",
65
"optional": true,
66
"preprocess": "localize",
67
"onError": "warn"
68
},
69
70
"version": {
71
"type": "string",
72
"optional": false
73
},
74
75
"homepage_url": {
76
"type": "string",
77
"format": "url",
78
"optional": true,
79
"preprocess": "localize"
80
}
81
}
82
},
83
{
84
"id": "WebExtensionManifest",
85
"type": "object",
86
"description": "Represents a WebExtension manifest.json file",
87
88
"$import": "ManifestBase",
89
"properties": {
90
"minimum_chrome_version":{
91
"type": "string",
92
"optional": true
93
},
94
95
"minimum_opera_version":{
96
"type": "string",
97
"optional": true
98
},
99
100
"icons": {
101
"type": "object",
102
"optional": true,
103
"patternProperties": {
104
"^[1-9]\\d*$": { "$ref": "ExtensionFileUrl" }
105
}
106
},
107
108
"incognito": {
109
"type": "string",
110
"enum": ["not_allowed", "spanning"],
111
"default": "spanning",
112
"optional": true
113
},
114
115
"background": {
116
"choices": [
117
{
118
"type": "object",
119
"properties": {
120
"page": { "$ref": "ExtensionURL" },
121
"persistent": {
122
"optional": true,
123
"$ref": "PersistentBackgroundProperty"
124
}
125
},
126
"additionalProperties": { "$ref": "UnrecognizedProperty" }
127
},
128
{
129
"type": "object",
130
"properties": {
131
"scripts": {
132
"type": "array",
133
"items": { "$ref": "ExtensionURL" }
134
},
135
"persistent": {
136
"optional": true,
137
"$ref": "PersistentBackgroundProperty"
138
}
139
},
140
"additionalProperties": { "$ref": "UnrecognizedProperty" }
141
}
142
],
143
"optional": true
144
},
145
146
"options_ui": {
147
"type": "object",
148
149
"optional": true,
150
151
"properties": {
152
"page": { "$ref": "ExtensionURL" },
153
"browser_style": {
154
"type": "boolean",
155
"optional": true,
156
"default": true
157
},
158
"chrome_style": {
159
"type": "boolean",
160
"optional": true
161
},
162
"open_in_tab": {
163
"type": "boolean",
164
"optional": true
165
}
166
},
167
168
"additionalProperties": {
169
"type": "any",
170
"deprecated": "An unexpected property was found in the WebExtension manifest"
171
}
172
},
173
174
"content_scripts": {
175
"type": "array",
176
"optional": true,
177
"items": { "$ref": "ContentScript" }
178
},
179
180
"content_security_policy": {
181
"type": "string",
182
"optional": true,
183
"format": "contentSecurityPolicy",
184
"onError": "warn"
185
},
186
187
"permissions": {
188
"type": "array",
189
"default": [],
190
"items": {
191
"$ref": "PermissionOrOrigin",
192
"onError": "warn"
193
},
194
"optional": true
195
},
196
197
"optional_permissions": {
198
"type": "array",
199
"items": {
200
"$ref": "OptionalPermissionOrOrigin",
201
"onError": "warn"
202
},
203
"optional": true,
204
"default": []
205
},
206
207
"web_accessible_resources": {
208
"type": "array",
209
"items": { "type": "string" },
210
"optional": true
211
},
212
213
"developer": {
214
"type": "object",
215
"optional": true,
216
"properties": {
217
"name": {
218
"type": "string",
219
"optional": true,
220
"preprocess": "localize"
221
},
222
"url": {
223
"type": "string",
224
"optional": true,
225
"preprocess": "localize"
226
}
227
}
228
},
229
230
"hidden": {
231
"type": "boolean",
232
"optional": true,
233
"default": false
234
}
235
},
236
237
"additionalProperties": { "$ref": "UnrecognizedProperty" }
238
},
239
{
240
"id": "WebExtensionLangpackManifest",
241
"type": "object",
242
"description": "Represents a WebExtension language pack manifest.json file",
243
244
"$import": "ManifestBase",
245
"properties": {
246
"homepage_url": {
247
"type": "string",
248
"format": "url",
249
"optional": true,
250
"preprocess": "localize"
251
},
252
253
"langpack_id": {
254
"type": "string",
255
"pattern": "^[a-zA-Z][a-zA-Z-]+$"
256
},
257
258
"languages": {
259
"type": "object",
260
"patternProperties": {
261
"^[a-z]{2}[a-zA-Z-]*$": {
262
"type": "object",
263
"properties": {
264
"chrome_resources": {
265
"type": "object",
266
"patternProperties": {
267
"^[a-zA-Z-.]+$": {
268
"choices": [
269
{
270
"$ref": "ExtensionURL"
271
},
272
{
273
"type": "object",
274
"patternProperties": {
275
"^[a-z]+$": {
276
"$ref": "ExtensionURL"
277
}
278
}
279
}
280
]
281
}
282
}
283
},
284
"version": {
285
"type": "string"
286
}
287
}
288
}
289
}
290
},
291
"sources": {
292
"type": "object",
293
"optional": true,
294
"patternProperties": {
295
"^[a-z]+$": {
296
"type": "object",
297
"properties": {
298
"base_path": {
299
"$ref": "ExtensionURL"
300
},
301
"paths": {
302
"type": "array",
303
"items": {
304
"type": "string",
305
"format": "strictRelativeUrl"
306
},
307
"optional": true
308
}
309
}
310
}
311
}
312
}
313
}
314
},
315
{
316
"id": "WebExtensionDictionaryManifest",
317
"type": "object",
318
"description": "Represents a WebExtension dictionary manifest.json file",
319
320
"$import": "ManifestBase",
321
"properties": {
322
"homepage_url": {
323
"type": "string",
324
"format": "url",
325
"optional": true,
326
"preprocess": "localize"
327
},
328
329
"dictionaries": {
330
"type": "object",
331
"patternProperties": {
332
"^[a-z]{2}[a-zA-Z-]*$": {
333
"type": "string",
334
"format": "strictRelativeUrl",
335
"pattern": "\\.dic$"
336
}
337
}
338
}
339
}
340
},
341
{
342
"id": "ThemeIcons",
343
"type": "object",
344
"properties": {
345
"light": {
346
"$ref": "ExtensionURL",
347
"description": "A light icon to use for dark themes"
348
},
349
"dark": {
350
"$ref": "ExtensionURL",
351
"description": "The dark icon to use for light themes"
352
},
353
"size": {
354
"type": "integer",
355
"description": "The size of the icons"
356
}
357
},
358
"additionalProperties": { "$ref": "UnrecognizedProperty" }
359
},
360
{
361
"id": "OptionalPermission",
362
"choices": [
363
{
364
"type": "string",
365
"enum": [
366
"clipboardRead",
367
"clipboardWrite",
368
"geolocation",
369
"idle",
370
"notifications"
371
]
372
}
373
]
374
},
375
{
376
"id": "OptionalPermissionOrOrigin",
377
"choices": [
378
{ "$ref": "OptionalPermission" },
379
{ "$ref": "MatchPattern" }
380
]
381
},
382
{
383
"id": "Permission",
384
"choices": [
385
{ "$ref": "OptionalPermission" },
386
{
387
"type": "string",
388
"enum": [
389
"alarms",
390
"mozillaAddons",
391
"storage",
392
"unlimitedStorage"
393
]
394
}
395
]
396
},
397
{
398
"id": "PermissionOrOrigin",
399
"choices": [
400
{ "$ref": "Permission" },
401
{ "$ref": "MatchPattern" }
402
]
403
},
404
{
405
"id": "HttpURL",
406
"type": "string",
407
"format": "url",
408
"pattern": "^https?://.*$"
409
},
410
{
411
"id": "ExtensionURL",
412
"type": "string",
413
"format": "strictRelativeUrl"
414
},
415
{
416
"id": "ExtensionFileUrl",
417
"type": "string",
418
"format": "strictRelativeUrl",
419
"pattern": "\\S",
420
"preprocess": "localize"
421
},
422
{
423
"id": "ImageDataOrExtensionURL",
424
"type": "string",
425
"format": "imageDataOrStrictRelativeUrl"
426
},
427
{
428
"id": "ExtensionID",
429
"choices": [
430
{
431
"type": "string",
432
"pattern": "(?i)^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"
433
},
434
{
435
"type": "string",
436
"pattern": "(?i)^[a-z0-9-._]*@[a-z0-9-._]+$"
437
}
438
]
439
},
440
{
441
"id": "FirefoxSpecificProperties",
442
"type": "object",
443
"properties": {
444
"id": {
445
"$ref": "ExtensionID",
446
"optional": true
447
},
448
449
"update_url": {
450
"type": "string",
451
"format": "url",
452
"optional": true
453
},
454
455
"strict_min_version": {
456
"type": "string",
457
"optional": true
458
},
459
460
"strict_max_version": {
461
"type": "string",
462
"optional": true
463
}
464
}
465
},
466
{
467
"id": "MatchPattern",
468
"choices": [
469
{
470
"type": "string",
471
"enum": ["<all_urls>"]
472
},
473
{
474
"$ref": "MatchPatternRestricted"
475
},
476
{
477
"$ref": "MatchPatternUnestricted"
478
}
479
]
480
},
481
{
482
"id": "MatchPatternRestricted",
483
"description": "Same as MatchPattern above, but excludes <all_urls>",
484
"choices": [
485
{
486
"type": "string",
487
"pattern": "^(https?|wss?|file|ftp|\\*)://(\\*|\\*\\.[^*/]+|[^*/]+)/.*$"
488
},
489
{
490
"type": "string",
491
"pattern": "^file:///.*$"
492
}
493
]
494
},
495
{
496
"id": "MatchPatternUnestricted",
497
"description": "Mostly unrestricted match patterns for privileged add-ons. This should technically be rejected for unprivileged add-ons, but, reasons. The MatchPattern class will still refuse privileged schemes for those extensions.",
498
"choices": [
499
{
500
"type": "string",
502
}
503
]
504
},
505
{
506
"id": "ContentScript",
507
"type": "object",
508
"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.",
509
"additionalProperties": { "$ref": "UnrecognizedProperty" },
510
"properties": {
511
"matches": {
512
"type": "array",
513
"optional": false,
514
"minItems": 1,
515
"items": { "$ref": "MatchPattern" }
516
},
517
"exclude_matches": {
518
"type": "array",
519
"optional": true,
520
"minItems": 1,
521
"items": { "$ref": "MatchPattern" }
522
},
523
"include_globs": {
524
"type": "array",
525
"optional": true,
526
"items": { "type": "string" }
527
},
528
"exclude_globs": {
529
"type": "array",
530
"optional": true,
531
"items": { "type": "string" }
532
},
533
"css": {
534
"type": "array",
535
"optional": true,
536
"description": "The list of CSS files to inject",
537
"items": { "$ref": "ExtensionURL" }
538
},
539
"js": {
540
"type": "array",
541
"optional": true,
542
"description": "The list of JS files to inject",
543
"items": { "$ref": "ExtensionURL" }
544
},
545
"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."},
546
"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>."},
547
"run_at": {
548
"$ref": "extensionTypes.RunAt",
549
"optional": true,
550
"default": "document_idle",
551
"description": "The soonest that the JavaScript or CSS will be injected into the tab. Defaults to \"document_idle\"."
552
}
553
}
554
},
555
{
556
"id": "IconPath",
557
"choices": [
558
{
559
"type": "object",
560
"patternProperties": {
561
"^[1-9]\\d*$": { "$ref": "ExtensionFileUrl" }
562
},
563
"additionalProperties": false
564
},
565
{ "$ref": "ExtensionFileUrl" }
566
]
567
},
568
{
569
"id": "IconImageData",
570
"choices": [
571
{
572
"type": "object",
573
"patternProperties": {
574
"^[1-9]\\d*$": { "$ref": "ImageData" }
575
},
576
"additionalProperties": false
577
},
578
{ "$ref": "ImageData" }
579
]
580
},
581
{
582
"id": "ImageData",
583
"type": "object",
584
"isInstanceOf": "ImageData",
585
"postprocess": "convertImageDataToURL"
586
},
587
{
588
"id": "UnrecognizedProperty",
589
"type": "any",
590
"deprecated": "An unexpected property was found in the WebExtension manifest."
591
},
592
{
593
"id": "PersistentBackgroundProperty",
594
"choices": [
595
{
596
"type": "boolean",
597
"enum": [true]
598
},
599
{
600
"type": "boolean",
601
"enum": [false],
602
"deprecated": "Event pages are not currently supported. This will run as a persistent background page."
603
}
604
]
605
}
606
]
607
}
608
]