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

Delta Between Two Patch Sets: templates/geckoInfo.js.tmpl

Issue 29365583: Issue 4670 - Add a new build type for Gecko-based WebExtensions (Closed) Base URL: https://hg.adblockplus.org/buildtools
Left Patch Set: Addressed comments Created Dec. 1, 2016, 9:38 p.m.
Right Patch Set: Split out info module into a Chrome and Gecko specific one Created Dec. 3, 2016, 7:02 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « packagerChrome.py ('k') | templates/manifest.json.tmpl » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(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 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld