| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 Loading... | |
| 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 = "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 }); | 871 }); |
| 891 | 872 |
| 892 // Advanced tab | 873 // Advanced tab |
| 893 let customize = document.querySelectorAll("#customize li[data-pref]"); | 874 let customize = document.querySelectorAll("#customize li[data-pref]"); |
| 894 customize = Array.prototype.map.call(customize, (checkbox) => | 875 customize = Array.prototype.map.call(customize, (checkbox) => |
| 895 { | 876 { |
| 896 return checkbox.getAttribute("data-pref"); | 877 return checkbox.getAttribute("data-pref"); |
| 897 }); | 878 }); |
| 898 for (let key of customize) | 879 for (let key of customize) |
| 899 { | 880 { |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 929 { | 910 { |
| 930 setLinks("report-issue", link); | 911 setLinks("report-issue", link); |
| 931 }); | 912 }); |
| 932 getDocLink("adblock_plus_report_ad", (link) => | 913 getDocLink("adblock_plus_report_ad", (link) => |
| 933 { | 914 { |
| 934 setLinks("report-ad", link); | 915 setLinks("report-ad", link); |
| 935 }); | 916 }); |
| 936 getDocLink("adblock_plus_report_bug", (link) => | 917 getDocLink("adblock_plus_report_bug", (link) => |
| 937 { | 918 { |
| 938 setLinks("report-bug", link); | 919 setLinks("report-bug", link); |
| 920 }); | |
| 921 getDocLink("{browser}_support", url => | |
| 922 { | |
| 923 setLinks("visit-forum", url); | |
| 939 }); | 924 }); |
| 940 getDocLink("social_twitter", (link) => | 925 getDocLink("social_twitter", (link) => |
| 941 { | 926 { |
| 942 E("twitter").setAttribute("href", link); | 927 E("twitter").setAttribute("href", link); |
| 943 }); | 928 }); |
| 944 getDocLink("social_facebook", (link) => | 929 getDocLink("social_facebook", (link) => |
| 945 { | 930 { |
| 946 E("facebook").setAttribute("href", link); | 931 E("facebook").setAttribute("href", link); |
| 947 }); | 932 }); |
| 948 getDocLink("social_gplus", (link) => | 933 getDocLink("social_gplus", (link) => |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1396 }); | 1381 }); |
| 1397 ext.backgroundPage.sendMessage({ | 1382 ext.backgroundPage.sendMessage({ |
| 1398 type: "subscriptions.listen", | 1383 type: "subscriptions.listen", |
| 1399 filter: ["added", "disabled", "homepage", "lastDownload", "removed", | 1384 filter: ["added", "disabled", "homepage", "lastDownload", "removed", |
| 1400 "title", "downloadStatus", "downloading"] | 1385 "title", "downloadStatus", "downloading"] |
| 1401 }); | 1386 }); |
| 1402 | 1387 |
| 1403 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 1388 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
| 1404 window.addEventListener("hashchange", onHashChange, false); | 1389 window.addEventListener("hashchange", onHashChange, false); |
| 1405 } | 1390 } |
| LEFT | RIGHT |