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
"optional": true,
182
"onError": "warn",
183
"choices": [
184
{
185
"type": "string",
186
"format": "contentSecurityPolicy"
187
},
188
{
189
"type": "object",
190
"properties": {
191
"extension_pages": {
192
"type": "string",
193
"optional": true,
194
"format": "contentSecurityPolicy"
195
},
196
"content_scripts": {
197
"type": "string",
198
"optional": true,
199
"format": "contentSecurityPolicy"
200
}
201
}
202
}
203
]
204
},
205
206
"permissions": {
207
"type": "array",
208
"default": [],
209
"items": {
210
"$ref": "PermissionOrOrigin",
211
"onError": "warn"
212
},
213
"optional": true
214
},
215
216
"optional_permissions": {
217
"type": "array",
218
"items": {
219
"$ref": "OptionalPermissionOrOrigin",
220
"onError": "warn"
221
},
222
"optional": true,
223
"default": []
224
},
225
226
"web_accessible_resources": {
227
"type": "array",
228
"items": { "type": "string" },
229
"optional": true
230
},
231
232
"developer": {
233
"type": "object",
234
"optional": true,
235
"properties": {
236
"name": {
237
"type": "string",
238
"optional": true,
239
"preprocess": "localize"
240
},
241
"url": {
242
"type": "string",
243
"optional": true,
244
"preprocess": "localize"
245
}
246
}
247
},
248
249
"hidden": {
250
"type": "boolean",
251
"optional": true,
252
"default": false
253
}
254
},
255
256
"additionalProperties": { "$ref": "UnrecognizedProperty" }
257
},
258
{
259
"id": "WebExtensionLangpackManifest",
260
"type": "object",
261
"description": "Represents a WebExtension language pack manifest.json file",
262
263
"$import": "ManifestBase",
264
"properties": {
265
"homepage_url": {
266
"type": "string",
267
"format": "url",
268
"optional": true,
269
"preprocess": "localize"
270
},
271
272
"langpack_id": {
273
"type": "string",
274
"pattern": "^[a-zA-Z][a-zA-Z-]+$"
275
},
276
277
"languages": {
278
"type": "object",
279
"patternProperties": {
280
"^[a-z]{2}[a-zA-Z-]*$": {
281
"type": "object",
282
"properties": {
283
"chrome_resources": {
284
"type": "object",
285
"patternProperties": {
286
"^[a-zA-Z-.]+$": {
287
"choices": [
288
{
289
"$ref": "ExtensionURL"
290
},
291
{
292
"type": "object",
293
"patternProperties": {
294
"^[a-z]+$": {
295
"$ref": "ExtensionURL"
296
}
297
}
298
}
299
]
300
}
301
}
302
},
303
"version": {
304
"type": "string"
305
}
306
}
307
}
308
}
309
},
310
"sources": {
311
"type": "object",
312
"optional": true,
313
"patternProperties": {
314
"^[a-z]+$": {
315
"type": "object",
316
"properties": {
317
"base_path": {
318
"$ref": "ExtensionURL"
319
},
320
"paths": {
321
"type": "array",
322
"items": {
323
"type": "string",
324
"format": "strictRelativeUrl"
325
},
326
"optional": true
327
}
328
}
329
}
330
}
331
}
332
}
333
},
334
{
335
"id": "WebExtensionDictionaryManifest",
336
"type": "object",
337
"description": "Represents a WebExtension dictionary manifest.json file",
338
339
"$import": "ManifestBase",
340
"properties": {
341
"homepage_url": {
342
"type": "string",
343
"format": "url",
344
"optional": true,
345
"preprocess": "localize"
346
},
347
348
"dictionaries": {
349
"type": "object",
350
"patternProperties": {
351
"^[a-z]{2}[a-zA-Z-]*$": {
352
"type": "string",
353
"format": "strictRelativeUrl",
354
"pattern": "\\.dic$"
355
}
356
}
357
}
358
}
359
},
360
{
361
"id": "ThemeIcons",
362
"type": "object",
363
"properties": {
364
"light": {
365
"$ref": "ExtensionURL",
366
"description": "A light icon to use for dark themes"
367
},
368
"dark": {
369
"$ref": "ExtensionURL",
370
"description": "The dark icon to use for light themes"
371
},
372
"size": {
373
"type": "integer",
374
"description": "The size of the icons"
375
}
376
},
377
"additionalProperties": { "$ref": "UnrecognizedProperty" }
378
},
379
{
380
"id": "OptionalPermission",
381
"choices": [
382
{
383
"type": "string",
384
"enum": [
385
"clipboardRead",
386
"clipboardWrite",
387
"geolocation",
388
"idle",
389
"notifications"
390
]
391
}
392
]
393
},
394
{
395
"id": "OptionalPermissionOrOrigin",
396
"choices": [
397
{ "$ref": "OptionalPermission" },
398
{ "$ref": "MatchPattern" }
399
]
400
},
401
{
402
"id": "Permission",
403
"choices": [
404
{ "$ref": "OptionalPermission" },
405
{
406
"type": "string",
407
"enum": [
408
"alarms",
409
"mozillaAddons",
410
"storage",
411
"unlimitedStorage"
412
]
413
}
414
]
415
},
416
{
417
"id": "PermissionOrOrigin",
418
"choices": [
419
{ "$ref": "Permission" },
420
{ "$ref": "MatchPattern" }
421
]
422
},
423
{
424
"id": "HttpURL",
425
"type": "string",
426
"format": "url",
427
"pattern": "^https?://.*$"
428
},
429
{
430
"id": "ExtensionURL",
431
"type": "string",
432
"format": "strictRelativeUrl"
433
},
434
{
435
"id": "ExtensionFileUrl",
436
"type": "string",
437
"format": "strictRelativeUrl",
438
"pattern": "\\S",
439
"preprocess": "localize"
440
},
441
{
442
"id": "ImageDataOrExtensionURL",
443
"type": "string",
444
"format": "imageDataOrStrictRelativeUrl"
445
},
446
{
447
"id": "ExtensionID",
448
"choices": [
449
{
450
"type": "string",
451
"pattern": "(?i)^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"
452
},
453
{
454
"type": "string",
455
"pattern": "(?i)^[a-z0-9-._]*@[a-z0-9-._]+$"
456
}
457
]
458
},
459
{
460
"id": "FirefoxSpecificProperties",
461
"type": "object",
462
"properties": {
463
"id": {
464
"$ref": "ExtensionID",
465
"optional": true
466
},
467
468
"update_url": {
469
"type": "string",
470
"format": "url",
471
"optional": true
472
},
473
474
"strict_min_version": {
475
"type": "string",
476
"optional": true
477
},
478
479
"strict_max_version": {
480
"type": "string",
481
"optional": true
482
}
483
}
484
},
485
{
486
"id": "MatchPattern",
487
"choices": [
488
{
489
"type": "string",
490
"enum": ["<all_urls>"]
491
},
492
{
493
"$ref": "MatchPatternRestricted"
494
},
495
{
496
"$ref": "MatchPatternUnestricted"
497
}
498
]
499
},
500
{
501
"id": "MatchPatternRestricted",
502
"description": "Same as MatchPattern above, but excludes <all_urls>",
503
"choices": [
504
{
505
"type": "string",
506
"pattern": "^(https?|wss?|file|ftp|\\*)://(\\*|\\*\\.[^*/]+|[^*/]+)/.*$"
507
},
508
{
509
"type": "string",
510
"pattern": "^file:///.*$"
511
}
512
]
513
},
514
{
515
"id": "MatchPatternUnestricted",
516
"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.",
517
"choices": [
518
{
519
"type": "string",
521
}
522
]
523
},
524
{
525
"id": "ContentScript",
526
"type": "object",
527
"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.",
528
"additionalProperties": { "$ref": "UnrecognizedProperty" },
529
"properties": {
530
"matches": {
531
"type": "array",
532
"optional": false,
533
"minItems": 1,
534
"items": { "$ref": "MatchPattern" }
535
},
536
"exclude_matches": {
537
"type": "array",
538
"optional": true,
539
"minItems": 1,
540
"items": { "$ref": "MatchPattern" }
541
},
542
"include_globs": {
543
"type": "array",
544
"optional": true,
545
"items": { "type": "string" }
546
},
547
"exclude_globs": {
548
"type": "array",
549
"optional": true,
550
"items": { "type": "string" }
551
},
552
"css": {
553
"type": "array",
554
"optional": true,
555
"description": "The list of CSS files to inject",
556
"items": { "$ref": "ExtensionURL" }
557
},
558
"js": {
559
"type": "array",
560
"optional": true,
561
"description": "The list of JS files to inject",
562
"items": { "$ref": "ExtensionURL" }
563
},
564
"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."},
565
"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>."},
566
"run_at": {
567
"$ref": "extensionTypes.RunAt",
568
"optional": true,
569
"default": "document_idle",
570
"description": "The soonest that the JavaScript or CSS will be injected into the tab. Defaults to \"document_idle\"."
571
}
572
}
573
},
574
{
575
"id": "IconPath",
576
"choices": [
577
{
578
"type": "object",
579
"patternProperties": {
580
"^[1-9]\\d*$": { "$ref": "ExtensionFileUrl" }
581
},
582
"additionalProperties": false
583
},
584
{ "$ref": "ExtensionFileUrl" }
585
]
586
},
587
{
588
"id": "IconImageData",
589
"choices": [
590
{
591
"type": "object",
592
"patternProperties": {
593
"^[1-9]\\d*$": { "$ref": "ImageData" }
594
},
595
"additionalProperties": false
596
},
597
{ "$ref": "ImageData" }
598
]
599
},
600
{
601
"id": "ImageData",
602
"type": "object",
603
"isInstanceOf": "ImageData",
604
"postprocess": "convertImageDataToURL"
605
},
606
{
607
"id": "UnrecognizedProperty",
608
"type": "any",
609
"deprecated": "An unexpected property was found in the WebExtension manifest."
610
},
611
{
612
"id": "PersistentBackgroundProperty",
613
"choices": [
614
{
615
"type": "boolean",
616
"enum": [true]
617
},
618
{
619
"type": "boolean",
620
"enum": [false],
621
"deprecated": "Event pages are not currently supported. This will run as a persistent background page."
622
}
623
]
624
}
625
]
626
}
627
]