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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 alert(errors.join("\n")); | 528 alert(errors.join("\n")); |
529 else if (onSuccess) | 529 else if (onSuccess) |
530 onSuccess(); | 530 onSuccess(); |
531 }); | 531 }); |
532 } | 532 } |
533 | 533 |
534 function openDocLink(id) | 534 function openDocLink(id) |
535 { | 535 { |
536 getDocLink(id, (link) => | 536 getDocLink(id, (link) => |
537 { | 537 { |
538 if (id == "share-general") | 538 location.href = link; |
539 openSharePopup(link); | |
540 else | |
541 location.href = link; | |
542 }); | 539 }); |
543 } | 540 } |
544 | 541 |
545 function switchTab(id) | 542 function switchTab(id) |
546 { | 543 { |
547 location.hash = id; | 544 location.hash = id; |
548 } | 545 } |
549 | 546 |
550 function execAction(action, element) | 547 function execAction(action, element) |
551 { | 548 { |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 | 889 |
893 getDocLink("subscriptions", (link) => | 890 getDocLink("subscriptions", (link) => |
894 { | 891 { |
895 setLinks("filter-lists-description", link); | 892 setLinks("filter-lists-description", link); |
896 }); | 893 }); |
897 | 894 |
898 E("custom-filters-raw").setAttribute("placeholder", | 895 E("custom-filters-raw").setAttribute("placeholder", |
899 getMessage("options_customFilters_edit_placeholder", ["/ads/track/*"])); | 896 getMessage("options_customFilters_edit_placeholder", ["/ads/track/*"])); |
900 | 897 |
901 // Help tab | 898 // Help tab |
902 getDocLink("faq", (link) => | 899 getDocLink("adblock_plus_report_issue", (link) => |
903 { | 900 { |
904 E("link-faq").setAttribute("href", link); | 901 setLinks("report-issue", link); |
| 902 }); |
| 903 getDocLink("adblock_plus_report_ad", (link) => |
| 904 { |
| 905 setLinks("report-ad", link); |
| 906 }); |
| 907 getDocLink("adblock_plus_report_bug", (link) => |
| 908 { |
| 909 setLinks("report-bug", link); |
| 910 }); |
| 911 getDocLink("reporter_other_link", (link) => |
| 912 { |
| 913 setLinks("report-forum", link); |
905 }); | 914 }); |
906 getDocLink("social_twitter", (link) => | 915 getDocLink("social_twitter", (link) => |
907 { | 916 { |
908 E("link-twitter").setAttribute("href", link); | 917 E("twitter").setAttribute("href", link); |
909 }); | 918 }); |
910 getDocLink("social_facebook", (link) => | 919 getDocLink("social_facebook", (link) => |
911 { | 920 { |
912 E("link-facebook").setAttribute("href", link); | 921 E("facebook").setAttribute("href", link); |
913 }); | 922 }); |
914 getDocLink("social_gplus", (link) => | 923 getDocLink("social_gplus", (link) => |
915 { | 924 { |
916 E("link-gplus").setAttribute("href", link); | 925 E("google-plus").setAttribute("href", link); |
917 }); | |
918 getDocLink("social_renren", (link) => | |
919 { | |
920 E("link-renren").setAttribute("href", link); | |
921 }); | 926 }); |
922 getDocLink("social_weibo", (link) => | 927 getDocLink("social_weibo", (link) => |
923 { | 928 { |
924 E("link-weibo").setAttribute("href", link); | 929 E("weibo").setAttribute("href", link); |
925 }); | |
926 | |
927 // Set forum link | |
928 ext.backgroundPage.sendMessage({ | |
929 type: "app.get", | |
930 what: "platform" | |
931 }, | |
932 (platform) => | |
933 { | |
934 ext.backgroundPage.sendMessage({ | |
935 type: "app.get", | |
936 what: "application" | |
937 }, | |
938 (application) => | |
939 { | |
940 if (platform == "chromium" && application != "opera") | |
941 application = "chrome"; | |
942 | |
943 getDocLink(application + "_support", (link) => | |
944 { | |
945 E("link-forum").setAttribute("href", link); | |
946 }); | |
947 }); | |
948 }); | 930 }); |
949 | 931 |
950 E("dialog").addEventListener("keydown", function(e) | 932 E("dialog").addEventListener("keydown", function(e) |
951 { | 933 { |
952 switch (getKey(e)) | 934 switch (getKey(e)) |
953 { | 935 { |
954 case "Escape": | 936 case "Escape": |
955 closeDialog(); | 937 closeDialog(); |
956 break; | 938 break; |
957 case "Tab": | 939 case "Tab": |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1388 }); | 1370 }); |
1389 ext.backgroundPage.sendMessage({ | 1371 ext.backgroundPage.sendMessage({ |
1390 type: "subscriptions.listen", | 1372 type: "subscriptions.listen", |
1391 filter: ["added", "disabled", "homepage", "lastDownload", "removed", | 1373 filter: ["added", "disabled", "homepage", "lastDownload", "removed", |
1392 "title", "downloadStatus", "downloading"] | 1374 "title", "downloadStatus", "downloading"] |
1393 }); | 1375 }); |
1394 | 1376 |
1395 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 1377 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
1396 window.addEventListener("hashchange", onHashChange, false); | 1378 window.addEventListener("hashchange", onHashChange, false); |
1397 } | 1379 } |
LEFT | RIGHT |