Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: templates/chromeInfo.js.tmpl

Issue 29365583: Issue 4670 - Add a new build type for Gecko-based WebExtensions (Closed) Base URL: https://hg.adblockplus.org/buildtools
Patch Set: Addressed comments Created Dec. 1, 2016, 9:38 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: templates/chromeInfo.js.tmpl
===================================================================
--- a/templates/chromeInfo.js.tmpl
+++ b/templates/chromeInfo.js.tmpl
@@ -24,16 +24,29 @@
}
else if (app == "Edge")
{
platform = "edgehtml";
platformVersion = ver;
application = "edge";
applicationVersion = "0";
}
+ else if (app == "Gecko" && typeof browser == "object" &&
Sebastian Noack 2016/12/02 11:47:50 Sorry for the confusion, but I just realized, that
Wladimir Palant 2016/12/03 19:02:56 Done.
+ browser.runtime && browser.runtime.getBrowserInfo)
+ {
+ platform = "gecko";
+ match = /\brv:(\d+(?:\.\d+)?)\b/.exec(navigator.userAgent);
+ if (match)
+ platformVersion = match[1];
+ browser.runtime.getBrowserInfo().then(function(info)
+ {
+ 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;
}
« no previous file with comments | « packagerChrome.py ('k') | templates/manifest.json.tmpl » ('j') | templates/manifest.json.tmpl » ('J')

Powered by Google App Engine
This is Rietveld