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

Delta Between Two Patch Sets: new-options.js

Issue 29555782: Issue 5701 - Inconsistent forum links and DNT link (Closed)
Left Patch Set: Fallback Created Sept. 25, 2017, 4:48 p.m.
Right Patch Set: Created Sept. 25, 2017, 9:26 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « new-options.html ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 }, false); 858 }, false);
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 getDocLink("adblock_plus_{browser}_dnt", url =>
869 // Get browser specific links 869 {
870 ext.backgroundPage.sendMessage({ 870 setLinks("dnt", url);
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 }); 871 });
895 872
896 // Advanced tab 873 // Advanced tab
897 let customize = document.querySelectorAll("#customize li[data-pref]"); 874 let customize = document.querySelectorAll("#customize li[data-pref]");
898 customize = Array.prototype.map.call(customize, (checkbox) => 875 customize = Array.prototype.map.call(customize, (checkbox) =>
899 { 876 {
900 return checkbox.getAttribute("data-pref"); 877 return checkbox.getAttribute("data-pref");
901 }); 878 });
902 for (let key of customize) 879 for (let key of customize)
903 { 880 {
(...skipping 29 matching lines...) Expand all
933 { 910 {
934 setLinks("report-issue", link); 911 setLinks("report-issue", link);
935 }); 912 });
936 getDocLink("adblock_plus_report_ad", (link) => 913 getDocLink("adblock_plus_report_ad", (link) =>
937 { 914 {
938 setLinks("report-ad", link); 915 setLinks("report-ad", link);
939 }); 916 });
940 getDocLink("adblock_plus_report_bug", (link) => 917 getDocLink("adblock_plus_report_bug", (link) =>
941 { 918 {
942 setLinks("report-bug", link); 919 setLinks("report-bug", link);
920 });
921 getDocLink("{browser}_support", url =>
922 {
923 setLinks("visit-forum", url);
943 }); 924 });
944 getDocLink("social_twitter", (link) => 925 getDocLink("social_twitter", (link) =>
945 { 926 {
946 E("twitter").setAttribute("href", link); 927 E("twitter").setAttribute("href", link);
947 }); 928 });
948 getDocLink("social_facebook", (link) => 929 getDocLink("social_facebook", (link) =>
949 { 930 {
950 E("facebook").setAttribute("href", link); 931 E("facebook").setAttribute("href", link);
951 }); 932 });
952 getDocLink("social_gplus", (link) => 933 getDocLink("social_gplus", (link) =>
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 }); 1381 });
1401 ext.backgroundPage.sendMessage({ 1382 ext.backgroundPage.sendMessage({
1402 type: "subscriptions.listen", 1383 type: "subscriptions.listen",
1403 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1384 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1404 "title", "downloadStatus", "downloading"] 1385 "title", "downloadStatus", "downloading"]
1405 }); 1386 });
1406 1387
1407 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1388 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1408 window.addEventListener("hashchange", onHashChange, false); 1389 window.addEventListener("hashchange", onHashChange, false);
1409 } 1390 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld