Hello, I've updated adblockplus.js.
adblockplus_settings has been updated to work with the current adblock, hypothetically, using content/ui/settings.xul instead of a now-defunct function from modules/Utils.jsm. However, due to [a longstanding bug][1], it still doesn't work on Linux. Other platforms are untested. However, the preferences are still accessible via the extensions dialog. [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=156333 Also, since said extensions dialog can't seem to open the Adblock filters dialog, I've added a function, adblockplus_filter_settings, and a corresponding interactive function, adblockplus-filter-settings. Enjoy! Ivy
>From 98d0b5403045539642abe6f617511f8340522b5c Mon Sep 17 00:00:00 2001 From: Ivy Foster <[email protected]> Date: Mon, 21 May 2012 16:18:34 -0400 Subject: [PATCH] Adblock Plus module: a few small repairs adblockplus_settings: removed an unused arg, updated to work with current adblock. Still doesn't work on Linux, due to https://bugzilla.mozilla.org/show_bug.cgi?id=156333 (from 2002!). However, settings are accessible as userprefs or via the extensions dialog. Added function adblockplus_filter_settings and interactive adblockplus-filter-settings. This works around not being able to open the filter settings from the extensions dialog. --- modules/extensions/adblockplus.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/extensions/adblockplus.js b/modules/extensions/adblockplus.js index aa10fd9..48ba23b 100644 --- a/modules/extensions/adblockplus.js +++ b/modules/extensions/adblockplus.js @@ -5,16 +5,25 @@ * COPYING file. **/ -function adblockplus_settings (uri_string) { +function adblockplus_settings () { if (! ("@adblockplus.org/abp/startup;1" in Cc)) throw interactive_error("Adblock Plus not found"); - Components.utils.import("chrome://adblockplus-modules/content/Utils.jsm"); - Utils.openSettingsDialog(uri_string); + make_chrome_window("chrome://adblockplus/content/ui/settings.xul") } + interactive("adblockplus-settings", "Show the Adblock Plus settings dialog.", function (I) { adblockplus_settings(); }); +function adblockplus_filter_settings () { + if (! ("@adblockplus.org/abp/startup;1" in Cc)) + throw interactive_error("Adblock Plus not found"); + make_chrome_window("chrome://adblockplus/content/ui/filters.xul") +} + +interactive("adblockplus-filter-settings", + "Show the Adblock Plus filter settings dialog.", + function (I) { adblockplus_filter_settings(); }); interactive("adblockplus-add", "Add a pattern to Adblock Plus.", -- 1.7.10.2
_______________________________________________ Conkeror mailing list [email protected] https://www.mozdev.org/mailman/listinfo/conkeror
