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: Also remove unused addonRoot Created Dec. 15, 2015, 4:52 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: "",
13 8
14 application: {{type|json}}, 9 application: {{type|json}},
15 get applicationVersion() 10 get applicationVersion()
16 { 11 {
17 {%- if type == 'opera' %} 12 {%- if type == 'opera' %}
18 var match = /\bOPR\/(\S+)/.exec(navigator.userAgent); 13 var match = /\bOPR\/(\S+)/.exec(navigator.userAgent);
19 return (match ? match[1] : "0"); 14 return (match ? match[1] : "0");
20 {%- else %} 15 {%- else %}
21 return this.platformVersion; 16 return this.platformVersion;
22 {%- endif %} 17 {%- endif %}
23 }, 18 },
24 19
25 platform: "chromium", 20 platform: "chromium",
26 get platformVersion() 21 get platformVersion()
27 { 22 {
28 var match = /\bChrome\/(\S+)/.exec(navigator.userAgent); 23 var match = /\bChrome\/(\S+)/.exec(navigator.userAgent);
29 return (match ? match[1] : "0"); 24 return (match ? match[1] : "0");
30 } 25 }
31 }; 26 };
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