Adblock Plus Ported to Webkit

Posted on January 4th, 2009 in Android Hacking by Disconnect  Tagged , , , ,

IRC member foobar’ has come up with a port of AdBlockPlus for the G1. (Update: Now with source!)

No code is available yet, but check out the screenshots:

I’ll update with more info when I get some. (And some code – he’s waiting on licensing questions right now.)

Updated: The code is available!
From the announcement:
Since my port of AdBlockPlus to WebKit is applicable to far more than just the HTC vogue (or even just android), here is the code. Unfortunately, WebKit doesn’t have content-policy plugins like FireFox, and since my goal was to just get this working in the quickest, dirtiest way possible, this is implemented as a very very sloppy hack to the WebCore code. Here is the patch for android. This only includes element-blocking, since that suffices to block everything on sites I visit on android, and my first shot at element hiding wasn’t too efficient. Here is the patch. To use it,
1. Apply patch
2. Place filter list (you can find a good one here) in /sdcard/block.txt
3. Run browser app. In settings, “Load Images” is now “Block ads” (see comment in patch for reasoning behind this; below is a patch to change text)
If you have any suggestions for how to move this into a plugin, please let me know.

Enjoy!

Webkit AdblockPlus Patch (319) Webkit AdblockPlus Text Change Patch (242)




Post a comment