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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 filterTextbox.value = ""; 818 filterTextbox.value = "";
819 }); 819 });
820 } 820 }
821 E("custom-filters-add").addEventListener("submit", function(e) 821 E("custom-filters-add").addEventListener("submit", function(e)
822 { 822 {
823 e.preventDefault(); 823 e.preventDefault();
824 addCustomFilters(); 824 addCustomFilters();
825 }, false); 825 }, false);
826 var customFilterEditButtons = document.querySelectorAll("#custom-filters-edi t-wrapper button"); 826 var customFilterEditButtons = document.querySelectorAll("#custom-filters-edi t-wrapper button");
827 827
828 //Help tab
829 getDocLink("faq", function(link)
830 {
831 E("link-faq").setAttribute("href", link);
832 });
833 getDocLink("social_twitter", function(link)
834 {
835 E("link-twitter").setAttribute("href", link);
836 });
837 getDocLink("social_facebook", function(link)
838 {
839 E("link-facebook").setAttribute("href", link);
840 });
841 getDocLink("social_gplus", function(link)
842 {
843 E("link-gplus").setAttribute("href", link);
844 });
845 getDocLink("social_renren", function(link)
846 {
847 E("link-renren").setAttribute("href", link);
848 });
849 getDocLink("social_weibo", function(link)
850 {
851 E("link-weibo").setAttribute("href", link);
852 });
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.
853
854 // Set forum link
855 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
856 {
857 type: "app.get",
858 what: "platform"
859 },
860 function(platform)
861 {
862 ext.backgroundPage.sendMessage(
863 {
864 type: "app.get",
865 what: "application"
866 },
867 function(application)
868 {
869 if (platform == "chromium" && application != "opera")
870 application = "chrome";
871
872 getDocLink(application + "_support", function(link)
873 {
874 E("link-forum").setAttribute("href", link);
875 });
876 });
877 });
878
828 E("dialog").addEventListener("keydown", function(e) 879 E("dialog").addEventListener("keydown", function(e)
829 { 880 {
830 switch (getKey(e)) 881 switch (getKey(e))
831 { 882 {
832 case "Escape": 883 case "Escape":
833 closeDialog(); 884 closeDialog();
834 break; 885 break;
835 case "Tab": 886 case "Tab":
836 if (e.shiftKey) 887 if (e.shiftKey)
837 { 888 {
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 ext.backgroundPage.sendMessage( 1316 ext.backgroundPage.sendMessage(
1266 { 1317 {
1267 type: "subscriptions.listen", 1318 type: "subscriptions.listen",
1268 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1319 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1269 "title", "downloadStatus", "downloading"] 1320 "title", "downloadStatus", "downloading"]
1270 }); 1321 });
1271 1322
1272 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1323 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1273 window.addEventListener("hashchange", onHashChange, false); 1324 window.addEventListener("hashchange", onHashChange, false);
1274 })(); 1325 })();
OLDNEW

Powered by Google App Engine
This is Rietveld