OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 menuItem = window.NativeWindow.menu.add(actionText, iconUrl, toggleWhiteli
st.bind(null, window)); | 909 menuItem = window.NativeWindow.menu.add(actionText, iconUrl, toggleWhiteli
st.bind(null, window)); |
910 }; | 910 }; |
911 | 911 |
912 UI.openSubscriptionDialog = function(window, url, title, mainURL, mainTitle) | 912 UI.openSubscriptionDialog = function(window, url, title, mainURL, mainTitle) |
913 { | 913 { |
914 let dialogTitle = this.overlay.attributes.subscriptionDialogTitle; | 914 let dialogTitle = this.overlay.attributes.subscriptionDialogTitle; |
915 let dialogMessage = this.overlay.attributes.subscriptionDialogMessage.repl
ace(/\?1\?/, title).replace(/\?2\?/, url); | 915 let dialogMessage = this.overlay.attributes.subscriptionDialogMessage.repl
ace(/\?1\?/, title).replace(/\?2\?/, url); |
916 if (Utils.confirm(window, dialogMessage, dialogTitle)) | 916 if (Utils.confirm(window, dialogMessage, dialogTitle)) |
917 this.setSubscription(url, title); | 917 this.setSubscription(url, title); |
918 }; | 918 }; |
| 919 |
| 920 UI.openFiltersDialog = function() |
| 921 { |
| 922 let window = UI.currentWindow; |
| 923 if (!window) |
| 924 return |
| 925 |
| 926 let browser = exports.addTab(window, "about:addons").browser; |
| 927 browser.addEventListener("load", function openAddonPrefs(event) |
| 928 { |
| 929 browser.removeEventListener("load", openAddonPrefs, true); |
| 930 Utils.runAsync(function() |
| 931 { |
| 932 let event = new Event("Event"); |
| 933 event.initEvent("popstate", true, false); |
| 934 event.state = {id: require("info").addonID}; |
| 935 browser._contentWindow.dispatchEvent(event); |
| 936 }); |
| 937 }, true); |
| 938 }; |
919 | 939 |
920 break; | 940 break; |
921 } | 941 } |
922 } | 942 } |
OLD | NEW |