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

Side by Side 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.
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 | « new-options.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 859
860 getDocLink("contribute", (link) => 860 getDocLink("contribute", (link) =>
861 { 861 {
862 E("contribute").href = link; 862 E("contribute").href = link;
863 }); 863 });
864 getDocLink("acceptable_ads_criteria", (link) => 864 getDocLink("acceptable_ads_criteria", (link) =>
865 { 865 {
866 setLinks("enable-aa-description", link); 866 setLinks("enable-aa-description", link);
867 }); 867 });
868 868
869 // Get browser specific links
870 ext.backgroundPage.sendMessage({
871 type: "app.get",
872 what: "browserInfo"
873 },
874 ({platform, application}) =>
875 {
876 if (platform == "chromium" && application != "opera")
877 application = "chrome";
878 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
879 application = "firefox";
880
881 getDocLink(application + "_support", url =>
882 {
883 setLinks("visit-forum", url);
884 });
885
886 getDocLink("adblock_plus_" + application + "_dnt", url =>
887 {
888 setLinks("dnt", url);
889 });
890 });
891
869 // Advanced tab 892 // Advanced tab
870 let customize = document.querySelectorAll("#customize li[data-pref]"); 893 let customize = document.querySelectorAll("#customize li[data-pref]");
871 customize = Array.prototype.map.call(customize, (checkbox) => 894 customize = Array.prototype.map.call(customize, (checkbox) =>
872 { 895 {
873 return checkbox.getAttribute("data-pref"); 896 return checkbox.getAttribute("data-pref");
874 }); 897 });
875 for (let key of customize) 898 for (let key of customize)
876 { 899 {
877 getPref(key, (value) => 900 getPref(key, (value) =>
878 { 901 {
(...skipping 28 matching lines...) Expand all
907 setLinks("report-issue", link); 930 setLinks("report-issue", link);
908 }); 931 });
909 getDocLink("adblock_plus_report_ad", (link) => 932 getDocLink("adblock_plus_report_ad", (link) =>
910 { 933 {
911 setLinks("report-ad", link); 934 setLinks("report-ad", link);
912 }); 935 });
913 getDocLink("adblock_plus_report_bug", (link) => 936 getDocLink("adblock_plus_report_bug", (link) =>
914 { 937 {
915 setLinks("report-bug", link); 938 setLinks("report-bug", link);
916 }); 939 });
917 getDocLink("reporter_other_link", (link) =>
918 {
919 setLinks("report-forum", link);
920 });
921 getDocLink("social_twitter", (link) => 940 getDocLink("social_twitter", (link) =>
922 { 941 {
923 E("twitter").setAttribute("href", link); 942 E("twitter").setAttribute("href", link);
924 }); 943 });
925 getDocLink("social_facebook", (link) => 944 getDocLink("social_facebook", (link) =>
926 { 945 {
927 E("facebook").setAttribute("href", link); 946 E("facebook").setAttribute("href", link);
928 }); 947 });
929 getDocLink("social_gplus", (link) => 948 getDocLink("social_gplus", (link) =>
930 { 949 {
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 }); 1396 });
1378 ext.backgroundPage.sendMessage({ 1397 ext.backgroundPage.sendMessage({
1379 type: "subscriptions.listen", 1398 type: "subscriptions.listen",
1380 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1399 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1381 "title", "downloadStatus", "downloading"] 1400 "title", "downloadStatus", "downloading"]
1382 }); 1401 });
1383 1402
1384 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1403 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1385 window.addEventListener("hashchange", onHashChange, false); 1404 window.addEventListener("hashchange", onHashChange, false);
1386 } 1405 }
OLDNEW
« 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