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