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

Side by Side Diff: chromeInfo.js.tmpl

Issue 11180001: Automatically generate info pseudo-module for Chromium-based applications (Closed)
Patch Set: Created July 22, 2013, 1:26 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromeDevenvPoller__.js.tmpl ('k') | packagerChrome.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * This file is part of the Adblock Plus build tools,
3 * Copyright (C) 2006-2013 Eyeo GmbH
4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 require.scopes.info = {
19 get addonID()
20 {
21 return chrome.i18n.getMessage("@@extension_id");
22 },
23 addonName: {{metadata.get('general', 'basename')|json}},
24 addonVersion: {{metadata.get('general', 'version')|json}},
25 addonRoot: "",
Thomas Greiner 2013/07/23 13:23:37 If you want to implement this you could use chrome
Wladimir Palant 2013/07/23 14:15:11 I don't think I want this implemented - knowing th
26
27 application: {{type|json}},
28 get applicationVersion()
29 {
30 {%- if type == 'opera' %}
31 var match = /\bOPR\/(\S+)/.exec(navigator.userAgent);
32 return (match ? match[1] : "0");
33 {%- else %}
34 return this.platformVersion;
35 {%- endif %}
36 },
37
38 platform: "chromium",
39 get platformVersion()
40 {
41 var match = /\bChrome\/(\S+)/.exec(navigator.userAgent);
42 return (match ? match[1] : "0");
43 }
44 };
OLDNEW
« no previous file with comments | « chromeDevenvPoller__.js.tmpl ('k') | packagerChrome.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld