| Left: | ||
| Right: |
| 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(state) | |
| 931 { | |
| 932 let event = new Event("Event"); | |
| 933 event.initEvent("popstate", true, false); | |
| 934 event.state = state; | |
| 935 browser._contentWindow.dispatchEvent(event); | |
| 936 }, this, {id: require("info").addonID}); | |
|
Wladimir Palant
2014/05/02 16:36:47
Passing in this and the state parameter is unneces
saroyanm
2014/05/03 08:02:06
My bad that I didn't left comment on this.
When I
Wladimir Palant
2014/05/03 17:54:18
That's indeed an issue. The list of add-ons is bei
saroyanm
2014/05/04 14:05:08
Thanks for descriptive answer Wladimir,
I also ha
| |
| 937 }, true); | |
| 938 }; | |
| 919 | 939 |
| 920 break; | 940 break; |
| 921 } | 941 } |
| 922 } | 942 } |
| OLD | NEW |