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 = this.currentWindow; | |
Wladimir Palant
2014/05/02 11:50:00
Please use UI.currentWindow explicitly - it wasn't
saroyanm
2014/05/02 14:07:27
Done.
| |
923 if (!window) | |
924 return | |
925 | |
926 let browser = window.BrowserApp.addTab("about:addons").browser; | |
Wladimir Palant
2014/05/02 11:50:00
How about:
let browser = exports.addTab(window,
saroyanm
2014/05/02 14:07:27
Sorry for not being attentive on that..
| |
927 browser.addEventListener("load", function openAddonPrefs(event) | |
928 { | |
929 browser.removeEventListener("load", openAddonPrefs, true); | |
930 browser._contentWindow.setTimeout(function() | |
saroyanm
2014/05/02 11:18:30
Couldn't find better approach while aboutAddons.js
Wladimir Palant
2014/05/02 11:50:00
Yes, you need to run this immediately after the pa
saroyanm
2014/05/02 14:07:27
Thanks for pointing on the method, gave me underst
| |
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 }, 200); | |
937 }, true); | |
Wladimir Palant
2014/05/02 11:50:00
I don't really see a point for having a capturing
saroyanm
2014/05/02 14:07:27
Yes actually It will not be triggered, not sure wh
| |
938 }; | |
919 | 939 |
920 break; | 940 break; |
921 } | 941 } |
922 } | 942 } |
OLD | NEW |