Index: templates/chromeInfo.js.tmpl |
=================================================================== |
--- a/templates/chromeInfo.js.tmpl |
+++ b/templates/chromeInfo.js.tmpl |
@@ -24,16 +24,28 @@ |
} |
else if (app == "Edge") |
{ |
platform = "edgehtml"; |
platformVersion = ver; |
application = "edge"; |
applicationVersion = "0"; |
} |
+ else if (app == "Gecko") |
+ { |
+ platform = "gecko"; |
+ match = /\brv:(\d+(?:\.\d+)?)\b/.exec(navigator.userAgent); |
+ if (match) |
+ platformVersion = match[1]; |
+ browser.runtime.getBrowserInfo().then(function(info) |
Sebastian Noack
2016/12/01 16:24:54
This will error out when running on Chrome with tw
Wladimir Palant
2016/12/01 21:39:31
Ok, let's add some more failsafes.
|
+ { |
+ require.scopes.info.application = info.name.toLowerCase(); |
+ require.scopes.info.applicationVersion = info.version; |
+ }); |
+ } |
else if (app != "Mozilla" && app != "AppleWebKit" && app != "Safari") |
{ |
// For compatibility with legacy websites, Chrome's UA |
// also includes a Mozilla, AppleWebKit and Safari token. |
// Any further name/version pair indicates a fork. |
application = app == "OPR" ? "opera" : app.toLowerCase(); |
applicationVersion = ver; |
} |