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

Side by Side Diff: chromeInfo.js.tmpl

Issue 29332683: Noissue - Removed unused info.addonID and info.addonRoot for Chrome and Safari (Closed)
Patch Set: Created Dec. 15, 2015, 4:27 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 | « no previous file | safariInfo.js.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 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 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/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 require.scopes.info = { 5 require.scopes.info = {
6 get addonID()
7 {
8 return chrome.i18n.getMessage("@@extension_id");
9 },
10 addonName: {{metadata.get('general', 'basename')|json}}, 6 addonName: {{metadata.get('general', 'basename')|json}},
11 addonVersion: {{version|json}}, 7 addonVersion: {{version|json}},
12 addonRoot: "", 8 addonRoot: "",
13 9
14 application: {{type|json}}, 10 application: {{type|json}},
15 get applicationVersion() 11 get applicationVersion()
16 { 12 {
17 {%- if type == 'opera' %} 13 {%- if type == 'opera' %}
18 var match = /\bOPR\/(\S+)/.exec(navigator.userAgent); 14 var match = /\bOPR\/(\S+)/.exec(navigator.userAgent);
19 return (match ? match[1] : "0"); 15 return (match ? match[1] : "0");
20 {%- else %} 16 {%- else %}
21 return this.platformVersion; 17 return this.platformVersion;
22 {%- endif %} 18 {%- endif %}
23 }, 19 },
24 20
25 platform: "chromium", 21 platform: "chromium",
26 get platformVersion() 22 get platformVersion()
27 { 23 {
28 var match = /\bChrome\/(\S+)/.exec(navigator.userAgent); 24 var match = /\bChrome\/(\S+)/.exec(navigator.userAgent);
29 return (match ? match[1] : "0"); 25 return (match ? match[1] : "0");
30 } 26 }
31 }; 27 };
OLDNEW
« no previous file with comments | « no previous file | safariInfo.js.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld