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

Unified Diff: messageResponder.js

Issue 29555782: Issue 5701 - Inconsistent forum links and DNT link (Closed)
Patch Set: Use placeholder for application Created Sept. 25, 2017, 8:47 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
« no previous file with comments | « no previous file | new-options.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: messageResponder.js
===================================================================
--- a/messageResponder.js
+++ b/messageResponder.js
@@ -156,7 +156,16 @@
}
if (message.what == "doclink")
- return Utils.getDocLink(message.link);
+ {
+ let {application, platform} = info;
Sebastian Noack 2017/09/25 21:03:22 Nit: I personally wouldn't assign "platform" to a
saroyanm 2017/09/25 21:21:45 Done.
+ if (platform == "chromium" && application != "opera")
+ application = "chrome";
+ else if (platform == "gecko")
+ application = "firefox";
+
+ let link = message.link.replace("{application}", application);
+ return Utils.getDocLink(link);
Sebastian Noack 2017/09/25 21:03:22 Nit: Why a temporary variable, and not just return
saroyanm 2017/09/25 21:17:33 Exceeded 80 char limit.
saroyanm 2017/09/25 21:28:00 Done.
+ }
if (message.what == "localeInfo")
{
« no previous file with comments | « no previous file | new-options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld