Adblock Plus and (a little) more
Did somebody ask for K-Meleon support? · 2006-09-20 03:36 by Wladimir Palant
This is the first development build of the binary K-Meleon plugin that allows K-Meleon users to use Adblock Plus. It is basically Adblock Plus 0.7.1.2 with a different packaging.
Installation
https://adblockplus.org/devbuilds/
Since K-Meleon is only available in English and German, I’m not providing installation packages for other languages. To install, unzip the package into your K-Meleon application directory (e.g. “C:\Program files\k-meleon”), it will put all the files into the right places. You might also want to add a menu entry for Adblock Plus, to do so put the following line into the file menus.cfg in you profile, maybe after “macros(JSConsole,JavaScript &Console)”:
adblockplus(Preferences,Ad&block Plus)
Everything else is configured automatically.
Edit: As it comes out, there is also a Russian version of K-Meleon. The next development build should be released in three languages then.
Known issues
- K-Meleon sometimes crashes on exit
- Window size isn’t restored when re-opening Preferences or Blockable items
- Blockable items doesn’t react to keyboard input when opened until you click it
- Probably a few dozen small memory leaks
- Toolbar/status bar icon not yet implemented
- Due to heavy use of non-frozen API the plugin won’t work with Gecko 1.9 without recompiling — this build is only for K-Meleon 1.0
- Middle mouse button doesn’t work properly in blockable items
- Blockable items and Preferences dialogs sometimes show K-Meleon’s default menu
- Subscription suggestions window doesn’t open on first startup
Known limitations
- Shortcut key preferences like
extensions.adblockplus.enable_key
use Win32 virtual key codes instead of Gecko’s virtual key codes - Blockable items must stay detached, K-Meleon’s sidebar implementation isn’t complete yet
- Blockable items window is always on top and refers to all browser windows
Comment [8]
Commenting is closed for this article.
LorenzoC · 2006-09-20 11:55 · #
Thank you a lot :)
Hao Jiang · 2006-09-20 19:06 · #
Very nice work! It works like a charm on K-Meleon 1.0. And I hope it can work with tabbed version K-Meleon (K-MeleonCCF) also. Or if you can share the code I can try to work on this. Thanks.
Reply from Wladimir Palant:
The source code is available via CVS — src/kmeleon
As to K-MeleonCCF — I doubt that it works properly there but right now I want to get the toolbar icon working.
Hao Jiang · 2006-09-20 20:32 · #
Well, I tried to put everything into the K-Meleon folder, but restart K-Meleon will not make the adblock plus work. The adblock plus plugin shows in the plugin list but it’s red even have it chosen. Any ideas? The GRE is the same as K-Meleon 1.0, only the difference of tab version and non-tab version.
Reply from Wladimir Palant:
In most cases it should print a message to JavaScript console telling why the plugin wouldn’t load.
Hao Jiang · 2006-09-20 21:49 · #
Unfortunately, the JavaScript console doesn’t give me any info this time:) Thank you anyway. In case you want to try the latest tabbed K-Meleon.exe with adblock plus, here is the file:
http://kmeleon.et8.net/K-Meleon.exe
Reply from Wladimir Palant:
Well, I see a message — “Failed to retrieve Adblock Plus component”. For some reason do_CreateInstance(ADBLOCKPLUS_CONTRACTID) returns nsnull even though the component has been properly registered. Maybe you send the “Load” message earlier, when XPCOM hasn’t been initialized yet?
Btw, K-MeleonCCF 0.05.6.4 crashes on me because it seems to ignore a -1 return code from “Load”. The plugin isn’t unloaded and received further messages with several unitialized variables — bad.
Reply from Wladimir Palant:
Ok, I got to the root of the problem — when the JavaScript component loads it tries to access the profile manager. However,
Components .classes["@mozilla.org/profile/manager;1"] .getService(Components.interfaces.nsIProfileInternal);
throws NS_ERROR_XPC_GS_RETURNED_FAILURE. If I remove this code initialization can proceed (I get a warning about Adblock being installed) but the it crashes somewhere.Btw, luamacros.dll fails to find its files unless K-Meleon is run from the application directory — not nice.
Reply from Wladimir Palant:
I traced this crash back as well. It crashes when processing “Create” message — adblockplus.dll calls kFuncs->GetMozillaWebBrowser() for the new window and K-MeleonCCF doesn’t seem to like it at that stage.
Hao Jiang · 2006-09-20 21:51 · #
My bad, the correct link is:
http://kmeleon.et8.net/k-meleon.exe
Really hope this plugin can work with the tabbed version also. Thank you for your work.
Hao Jiang · 2006-09-21 01:32 · #
Thank you very much for your reply. Dorian told me that one “load” feature is not present in the tab version like the normal version and it will be updated when the 1.02 out.
DizzG · 2006-09-24 09:49 · #
I tried to extract this into my default folder and it asked me when I restarted K meleon if I wanted to load ad block but after the browser started it doesnt load it
it shows in my plugin list but is red and shows failed to load
what happened?
Reply from Wladimir Palant:
There could be a number of reasons, e.g. this version doesn’t work with K-Meleon CCF yet. Maybe JavaScript console says something?
Hao Jiang · 2006-09-26 23:46 · #
The new 1.02 tab version is out and this plugin can still crash it maybe because:
the plugin is passing a bad parameter to the getmozillawebbrowser function?
Reply from Wladimir Palant:
It doesn’t. But as I noted before – Adblock Plus calls GetMozillaWebBrowser() when processing the “Create” message for the window and your version can’t handle it for some reason. Is your source code available somewhere?