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

Unified Diff: new-options.js

Issue 29555782: Issue 5701 - Inconsistent forum links and DNT link (Closed)
Patch Set: Addressed Sebastian's comments Created Sept. 25, 2017, 4:28 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 | « new-options.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: new-options.js
===================================================================
--- a/new-options.js
+++ b/new-options.js
@@ -866,6 +866,29 @@
setLinks("enable-aa-description", link);
});
+ // Get browser specific links
+ ext.backgroundPage.sendMessage({
+ type: "app.get",
+ what: "browserInfo"
+ },
+ ({platform, application}) =>
+ {
+ if (platform == "chromium" && application != "opera")
+ application = "chrome";
+ else if (platform == "gecko")
saroyanm 2017/09/25 16:44:46 Hmm I think in general we need a fallback for the
saroyanm 2017/09/25 16:55:07 Done.
Sebastian Noack 2017/09/25 17:09:22 info.platform is hard-coded in the respective buil
saroyanm 2017/09/25 18:07:53 Thanks for the info, I didn't know that we were ha
+ application = "firefox";
+
+ getDocLink(application + "_support", url =>
+ {
+ setLinks("visit-forum", url);
+ });
+
+ getDocLink("adblock_plus_" + application + "_dnt", url =>
+ {
+ setLinks("dnt", url);
+ });
+ });
+
// Advanced tab
let customize = document.querySelectorAll("#customize li[data-pref]");
customize = Array.prototype.map.call(customize, (checkbox) =>
@@ -914,10 +937,6 @@
{
setLinks("report-bug", link);
});
- getDocLink("reporter_other_link", (link) =>
- {
- setLinks("report-forum", link);
- });
getDocLink("social_twitter", (link) =>
{
E("twitter").setAttribute("href", link);
« no previous file with comments | « new-options.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld