| 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: "", | |
| 13 | 8 |
| 14 application: {{type|json}}, | 9 application: {{type|json}}, |
| 15 get applicationVersion() | 10 get applicationVersion() |
| 16 { | 11 { |
| 17 {%- if type == 'opera' %} | 12 {%- if type == 'opera' %} |
| 18 var match = /\bOPR\/(\S+)/.exec(navigator.userAgent); | 13 var match = /\bOPR\/(\S+)/.exec(navigator.userAgent); |
| 19 return (match ? match[1] : "0"); | 14 return (match ? match[1] : "0"); |
| 20 {%- else %} | 15 {%- else %} |
| 21 return this.platformVersion; | 16 return this.platformVersion; |
| 22 {%- endif %} | 17 {%- endif %} |
| 23 }, | 18 }, |
| 24 | 19 |
| 25 platform: "chromium", | 20 platform: "chromium", |
| 26 get platformVersion() | 21 get platformVersion() |
| 27 { | 22 { |
| 28 var match = /\bChrome\/(\S+)/.exec(navigator.userAgent); | 23 var match = /\bChrome\/(\S+)/.exec(navigator.userAgent); |
| 29 return (match ? match[1] : "0"); | 24 return (match ? match[1] : "0"); |
| 30 } | 25 } |
| 31 }; | 26 }; |
| OLD | NEW |