| Index: lib/ui.js |
| =================================================================== |
| --- a/lib/ui.js |
| +++ b/lib/ui.js |
| @@ -716,7 +716,31 @@ |
| } |
| else |
| { |
| - Services.ww.openWindow(null, "chrome://adblockplus/content/ui/filters.xul", "_blank", "chrome,centerscreen,resizable,dialog=no", {wrappedJSObject: filter}); |
| + let {application} = require("info"); |
| + if (application == "fennec2") |
| + { |
| + Cu.import("resource://gre/modules/Prompt.jsm"); |
| + let hasAcceptableAds = FilterStorage.subscriptions.some(function(subscription) subscription instanceof DownloadableSubscription && subscription.url == Prefs.subscriptions_exceptionsurl); |
| + let promtSettings = |
| + { |
| + title: Utils.getString("disable_aa_promt_title"), |
| + message: Utils.getString("disable_aa_promt_msg_already") |
| + }; |
| + |
| + if (hasAcceptableAds) |
| + { |
| + promtSettings["buttons"] = [Utils.getString("disable_aa_promt_ok"), Utils.getString("disable_aa_promt_cancel")]; |
| + promtSettings["message"] = Utils.getString("disable_aa_promt_msg"); |
| + } |
| + |
| + new Prompt(promtSettings).show(function(data) |
| + { |
| + if (data.button == 0) |
| + UI.toggleAcceptableAds(); |
| + }); |
| + } |
| + else |
| + Services.ww.openWindow(null, "chrome://adblockplus/content/ui/filters.xul", "_blank", "chrome,centerscreen,resizable,dialog=no", {wrappedJSObject: filter}); |
| } |
| }, |