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: Fallback Created Sept. 25, 2017, 4:48 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
« messageResponder.js ('K') | « 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 = "opera";
878 else if (platform == "gecko")
879 application = "firefox";
880 else if (application == "edge")
881 application = "edge";
882 else
883 application = "chrome";
884
885 getDocLink(application + "_support", url =>
886 {
887 setLinks("visit-forum", url);
888 });
889
890 getDocLink("adblock_plus_" + application + "_dnt", url =>
891 {
892 setLinks("dnt", url);
893 });
894 });
895
869 // Advanced tab 896 // Advanced tab
870 let customize = document.querySelectorAll("#customize li[data-pref]"); 897 let customize = document.querySelectorAll("#customize li[data-pref]");
871 customize = Array.prototype.map.call(customize, (checkbox) => 898 customize = Array.prototype.map.call(customize, (checkbox) =>
872 { 899 {
873 return checkbox.getAttribute("data-pref"); 900 return checkbox.getAttribute("data-pref");
874 }); 901 });
875 for (let key of customize) 902 for (let key of customize)
876 { 903 {
877 getPref(key, (value) => 904 getPref(key, (value) =>
878 { 905 {
(...skipping 28 matching lines...) Expand all
907 setLinks("report-issue", link); 934 setLinks("report-issue", link);
908 }); 935 });
909 getDocLink("adblock_plus_report_ad", (link) => 936 getDocLink("adblock_plus_report_ad", (link) =>
910 { 937 {
911 setLinks("report-ad", link); 938 setLinks("report-ad", link);
912 }); 939 });
913 getDocLink("adblock_plus_report_bug", (link) => 940 getDocLink("adblock_plus_report_bug", (link) =>
914 { 941 {
915 setLinks("report-bug", link); 942 setLinks("report-bug", link);
916 }); 943 });
917 getDocLink("reporter_other_link", (link) =>
918 {
919 setLinks("report-forum", link);
920 });
921 getDocLink("social_twitter", (link) => 944 getDocLink("social_twitter", (link) =>
922 { 945 {
923 E("twitter").setAttribute("href", link); 946 E("twitter").setAttribute("href", link);
924 }); 947 });
925 getDocLink("social_facebook", (link) => 948 getDocLink("social_facebook", (link) =>
926 { 949 {
927 E("facebook").setAttribute("href", link); 950 E("facebook").setAttribute("href", link);
928 }); 951 });
929 getDocLink("social_gplus", (link) => 952 getDocLink("social_gplus", (link) =>
930 { 953 {
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 }); 1400 });
1378 ext.backgroundPage.sendMessage({ 1401 ext.backgroundPage.sendMessage({
1379 type: "subscriptions.listen", 1402 type: "subscriptions.listen",
1380 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1403 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1381 "title", "downloadStatus", "downloading"] 1404 "title", "downloadStatus", "downloading"]
1382 }); 1405 });
1383 1406
1384 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1407 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1385 window.addEventListener("hashchange", onHashChange, false); 1408 window.addEventListener("hashchange", onHashChange, false);
1386 } 1409 }
OLDNEW
« messageResponder.js ('K') | « new-options.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld