OLD | NEW |
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 Loading... |
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 }); |
| 853 |
| 854 // Set forum link |
| 855 ext.backgroundPage.sendMessage( |
| 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 Loading... |
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 })(); |
OLD | NEW |