LEFT | RIGHT |
(no file at all) | |
| 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 "use strict"; |
| 6 |
| 7 (function() { |
| 8 let info = require.scopes.info = { |
| 9 addonName: {{ metadata.get('general', 'basename')|json }}, |
| 10 addonVersion: {{ version|json }}, |
| 11 |
| 12 application: "unknown", |
| 13 applicationVersion: "0", |
| 14 |
| 15 platform: "gecko", |
| 16 platformVersion: "0" |
| 17 }; |
| 18 |
| 19 let match = /\brv:(\d+(?:\.\d+)?)\b/.exec(navigator.userAgent); |
| 20 if (match) |
| 21 info.platformVersion = match[1]; |
| 22 |
| 23 browser.runtime.getBrowserInfo().then(function(browserInfo) |
| 24 { |
| 25 info.application = browserInfo.name.toLowerCase(); |
| 26 info.applicationVersion = browserInfo.version; |
| 27 }); |
| 28 })(); |
LEFT | RIGHT |