| 1 | /* This Source Code Form is subject to the terms of the Mozilla Public | 
|---|
| 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this | 
|---|
| 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 
|---|
| 4 |  | 
|---|
| 5 | { | 
|---|
| 6 | "manifest_version": 2, | 
|---|
| 7 | {%- if releaseBuild %} | 
|---|
| 8 | "name": "__MSG_name__", | 
|---|
| 9 | {%- else %} | 
|---|
| 10 | "name": "__MSG_name_devbuild__", | 
|---|
| 11 | {%- endif %} | 
|---|
| 12 |  | 
|---|
| 13 | "short_name": "__MSG_name__", | 
|---|
| 14 | "description": "__MSG_description__", | 
|---|
| 15 | "default_locale": "en_US", | 
|---|
| 16 | "version": {{version|json}}, | 
|---|
| 17 | "author": {{metadata.get('general', 'author')|json}}, | 
|---|
| 18 |  | 
|---|
| 19 | {%- if metadata.has_section('compat') and metadata.has_option('compat', 'chrome') %} | 
|---|
| 20 | "minimum_chrome_version": {{metadata.get('compat', 'chrome')|json}}, | 
|---|
| 21 | {%- endif %} | 
|---|
| 22 |  | 
|---|
| 23 | {%- if metadata.has_section('compat') and metadata.has_option('compat', 'opera') %} | 
|---|
| 24 | "minimum_opera_version": {{metadata.get('compat', 'opera')|json}}, | 
|---|
| 25 | {%- endif %} | 
|---|
| 26 |  | 
|---|
| 27 | {%- if metadata.has_section('compat') and metadata.has_option('compat', 'edge') %} | 
|---|
| 28 | "minimum_edge_version": {{metadata.get('compat', 'edge')|json}}, | 
|---|
| 29 | {%- endif %} | 
|---|
| 30 |  | 
|---|
| 31 | {%- if type == 'gecko' %} | 
|---|
| 32 | "applications": | 
|---|
| 33 | { | 
|---|
| 34 | "gecko": | 
|---|
| 35 | { | 
|---|
| 36 | "id": {{app_id|json}} | 
|---|
| 37 |  | 
|---|
| 38 | {%- if metadata.has_section('compat') and metadata.has_option('compat', 'gecko') %} | 
|---|
| 39 | , | 
|---|
| 40 | "strict_min_version": {{metadata.get('compat', 'gecko')|json}} | 
|---|
| 41 | {%- endif %} | 
|---|
| 42 |  | 
|---|
| 43 | {%- set updateURLSetting = 'updateURL' if releaseBuild else 'devbuildUpdateURL' %} | 
|---|
| 44 | {%- if metadata.has_option('general', updateURLSetting) %} | 
|---|
| 45 | , | 
|---|
| 46 | "update_url": {{metadata.get('general', updateURLSetting)|json}} | 
|---|
| 47 | {%- endif %} | 
|---|
| 48 | } | 
|---|
| 49 | }, | 
|---|
| 50 | {%- endif %} | 
|---|
| 51 |  | 
|---|
| 52 | {%- if pageAction %} | 
|---|
| 53 | "page_action": { | 
|---|
| 54 | "default_icon": {{pageAction.icon|json}}, | 
|---|
| 55 | {%- if pageAction.popup %} | 
|---|
| 56 | "default_popup": {{pageAction.popup|json}}, | 
|---|
| 57 | {%- endif %} | 
|---|
| 58 | "default_title": "__MSG_name__" | 
|---|
| 59 | }, | 
|---|
| 60 | {%- endif %} | 
|---|
| 61 |  | 
|---|
| 62 | {%- if browserAction %} | 
|---|
| 63 | "browser_action": { | 
|---|
| 64 | "default_icon": {{browserAction.icon|json}}, | 
|---|
| 65 | {%- if browserAction.popup %} | 
|---|
| 66 | "default_popup": {{browserAction.popup|json}}, | 
|---|
| 67 | {%- endif %} | 
|---|
| 68 | "default_title": "__MSG_name__" | 
|---|
| 69 | }, | 
|---|
| 70 | {%- endif %} | 
|---|
| 71 |  | 
|---|
| 72 | {%- if icons %} | 
|---|
| 73 | "icons": {{icons|json}}, | 
|---|
| 74 | {%- endif %} | 
|---|
| 75 |  | 
|---|
| 76 | {%- if permissions %} | 
|---|
| 77 | "permissions": {{permissions|json}}, | 
|---|
| 78 | {%- endif %} | 
|---|
| 79 |  | 
|---|
| 80 | {%- if optionalPermissions %} | 
|---|
| 81 | "optional_permissions": {{optionalPermissions|json}}, | 
|---|
| 82 | {%- endif %} | 
|---|
| 83 |  | 
|---|
| 84 | {%- if backgroundScripts %} | 
|---|
| 85 | "background": { | 
|---|
| 86 | "scripts": {{backgroundScripts|json}}, | 
|---|
| 87 | "persistent": true | 
|---|
| 88 | }, | 
|---|
| 89 | {%- endif %} | 
|---|
| 90 |  | 
|---|
| 91 | {%- if metadata.has_option('general', 'options') %} | 
|---|
| 92 | {%- if type != 'edge' %} | 
|---|
| 93 | "options_ui": { | 
|---|
| 94 | "page": {{metadata.get('general', 'options')|json}}, | 
|---|
| 95 | "open_in_tab": true | 
|---|
| 96 | }, | 
|---|
| 97 | {%- else %} | 
|---|
| 98 | "options_page": {{metadata.get('general', 'options')|json}}, | 
|---|
| 99 | {%- endif %} | 
|---|
| 100 | {%- endif %} | 
|---|
| 101 |  | 
|---|
| 102 | {%- if metadata.has_option('general', 'devtools') %} | 
|---|
| 103 | "devtools_page": {{metadata.get('general', 'devtools')|json}}, | 
|---|
| 104 | {%- endif %} | 
|---|
| 105 |  | 
|---|
| 106 | {%- if contentScripts %} | 
|---|
| 107 | "content_scripts": {{contentScripts|json}}, | 
|---|
| 108 | {%- endif %} | 
|---|
| 109 |  | 
|---|
| 110 | {%- if webAccessible %} | 
|---|
| 111 | "web_accessible_resources": {{webAccessible|json}}, | 
|---|
| 112 | {%- endif %} | 
|---|
| 113 |  | 
|---|
| 114 | {%- if externallyConnectable %} | 
|---|
| 115 | "externally_connectable": { | 
|---|
| 116 | "matches": {{externallyConnectable|json}} | 
|---|
| 117 | }, | 
|---|
| 118 | {%- endif %} | 
|---|
| 119 |  | 
|---|
| 120 | {%- if metadata.has_option('general', 'managedStorageSchema') %} | 
|---|
| 121 | "storage": { | 
|---|
| 122 | "managed_schema": {{metadata.get('general', 'managedStorageSchema')|json}} | 
|---|
| 123 | }, | 
|---|
| 124 | {%- endif %} | 
|---|
| 125 |  | 
|---|
| 126 | {%- if metadata.has_option('general', 'contentSecurityPolicy') %} | 
|---|
| 127 | "content_security_policy": {{metadata.get('general', 'contentSecurityPolicy')|json}}, | 
|---|
| 128 | {%- endif %} | 
|---|
| 129 |  | 
|---|
| 130 | "_dummy": false | 
|---|
| 131 | } | 
|---|