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

Unified Diff: new-options.js

Issue 29373674: Issue 3487 - Add links to the help tab (Closed)
Patch Set: Created Jan. 27, 2017, 5:20 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
Index: new-options.js
===================================================================
--- a/new-options.js
+++ b/new-options.js
@@ -825,6 +825,57 @@
}, false);
var customFilterEditButtons = document.querySelectorAll("#custom-filters-edit-wrapper button");
+ //Help tab
+ getDocLink("faq", function(link)
+ {
+ E("link-faq").setAttribute("href", link);
+ });
+ getDocLink("social_twitter", function(link)
+ {
+ E("link-twitter").setAttribute("href", link);
+ });
+ getDocLink("social_facebook", function(link)
+ {
+ E("link-facebook").setAttribute("href", link);
+ });
+ getDocLink("social_gplus", function(link)
+ {
+ E("link-gplus").setAttribute("href", link);
+ });
+ getDocLink("social_renren", function(link)
+ {
+ E("link-renren").setAttribute("href", link);
+ });
+ getDocLink("social_weibo", function(link)
+ {
+ E("link-weibo").setAttribute("href", link);
+ });
Thomas Greiner 2017/01/31 14:29:22 We should definitely try to make this more elegant
saroyanm 2017/02/01 13:22:18 Agree, we can discuss details in #4856
Thomas Greiner 2017/02/02 12:28:47 Thanks.
+
+ // Set forum link
+ ext.backgroundPage.sendMessage(
saroyanm 2017/01/27 17:23:43 I think we create a function, similar to the "getD
Thomas Greiner 2017/01/31 14:29:22 I guess you're referring to https://hg.adblockplus
saroyanm 2017/02/01 13:22:18 Agree, you want me to tackle it here, or in a sepa
Thomas Greiner 2017/02/02 12:28:47 Let's tackle this separately. It does look like no
saroyanm 2017/02/08 13:13:29 I'm having a hard time of thinking about the new t
+ {
+ type: "app.get",
+ what: "platform"
+ },
+ function(platform)
+ {
+ ext.backgroundPage.sendMessage(
+ {
+ type: "app.get",
+ what: "application"
+ },
+ function(application)
+ {
+ if (platform == "chromium" && application != "opera")
+ application = "chrome";
+
+ getDocLink(application + "_support", function(link)
+ {
+ E("link-forum").setAttribute("href", link);
+ });
+ });
+ });
+
E("dialog").addEventListener("keydown", function(e)
{
switch (getKey(e))

Powered by Google App Engine
This is Rietveld