OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 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 | 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/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 require.scopes.info = { | 5 require.scopes.info = { |
6 get addonID() | |
7 { | |
8 return chrome.i18n.getMessage("@@extension_id"); | |
9 }, | |
10 addonName: {{metadata.get('general', 'basename')|json}}, | 6 addonName: {{metadata.get('general', 'basename')|json}}, |
11 addonVersion: {{version|json}}, | 7 addonVersion: {{version|json}}, |
12 addonRoot: "", | 8 addonRoot: "", |
13 | 9 |
14 application: {{type|json}}, | 10 application: {{type|json}}, |
15 get applicationVersion() | 11 get applicationVersion() |
16 { | 12 { |
17 {%- if type == 'opera' %} | 13 {%- if type == 'opera' %} |
18 var match = /\bOPR\/(\S+)/.exec(navigator.userAgent); | 14 var match = /\bOPR\/(\S+)/.exec(navigator.userAgent); |
19 return (match ? match[1] : "0"); | 15 return (match ? match[1] : "0"); |
20 {%- else %} | 16 {%- else %} |
21 return this.platformVersion; | 17 return this.platformVersion; |
22 {%- endif %} | 18 {%- endif %} |
23 }, | 19 }, |
24 | 20 |
25 platform: "chromium", | 21 platform: "chromium", |
26 get platformVersion() | 22 get platformVersion() |
27 { | 23 { |
28 var match = /\bChrome\/(\S+)/.exec(navigator.userAgent); | 24 var match = /\bChrome\/(\S+)/.exec(navigator.userAgent); |
29 return (match ? match[1] : "0"); | 25 return (match ? match[1] : "0"); |
30 } | 26 } |
31 }; | 27 }; |
OLD | NEW |