Index: templates/geckoInfo.js.tmpl |
diff --git a/templates/geckoInfo.js.tmpl b/templates/geckoInfo.js.tmpl |
index 0779ee226a22c555027f3bb7e79eddacb9301bbc..c82d6106cf84e48a6547927fe1d4ca1ab8cc8faf 100644 |
--- a/templates/geckoInfo.js.tmpl |
+++ b/templates/geckoInfo.js.tmpl |
@@ -4,25 +4,21 @@ |
"use strict"; |
-(function() { |
- let info = require.scopes.info = { |
- addonName: {{ metadata.get('general', 'basename')|json }}, |
- addonVersion: {{ version|json }}, |
+exports.addonName = {{ basename|json }}; |
+exports.addonVersion = {{ version|json }}; |
- application: "unknown", |
- applicationVersion: "0", |
+exports.application = "unknown"; |
+exports.applicationVersion = "0"; |
- platform: "gecko", |
- platformVersion: "0" |
- }; |
+exports.platform = "gecko"; |
+exports.platformVersion = "0"; |
- let match = /\brv:(\d+(?:\.\d+)?)\b/.exec(navigator.userAgent); |
- if (match) |
- info.platformVersion = match[1]; |
+let match = /\brv:(\d+(?:\.\d+)?)\b/.exec(navigator.userAgent); |
+if (match) |
+ exports.platformVersion = match[1]; |
- browser.runtime.getBrowserInfo().then(function(browserInfo) |
- { |
- info.application = browserInfo.name.toLowerCase(); |
- info.applicationVersion = browserInfo.version; |
- }); |
-})(); |
+browser.runtime.getBrowserInfo().then(browserInfo => |
+{ |
+ exports.application = browserInfo.name.toLowerCase(); |
+ exports.applicationVersion = browserInfo.version; |
+}); |