howto modify abp source to replace banner image?

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
eharper
Posts: 1
Joined: Wed Jan 17, 2007 9:53 pm

howto modify abp source to replace banner image?

Post by eharper »

I'm currently attempting to modify my install of abp so that I can replace detected banners with my own images.

Right now I'm unzipping the .jar and in policy.js replacing

Code: Select all

wnd.setTimeout(hideNode, 0, node);
with code that changes the node's src if it's an image. (is there a smarter way to do this?)

After rezipping/renaming to a jar, firefox errors on loading. This is because of a checksum/security thing i assume?

I don't have much experience with moz plugins, so forgive me if i'm missing the obvious- i'm not terrible at javascript, but know nearly nothing about the build/install process. Will i have to build from source and how much will i have to modify the build scripts if that's the case?
Wladimir Palant

Post by Wladimir Palant »

No, there are no checksums. This JAR file is just a regular ZIP, so you have probably done something wrong.

What is certainly wrong is replacing the timeout here. Any modifications must happen after the content policies are done, a 0 ms timeout is the easiest thing to do here. If you don't respect this rule, you might cause crashes, it will also open a security hole.
User avatar
Peng
Posts: 518
Joined: Fri Jun 09, 2006 8:14 pm
Location: Central Florida
Contact:

Post by Peng »

Wladimir Palant wrote:What is certainly wrong is replacing the timeout here. Any modifications must happen after the content policies are done, a 0 ms timeout is the easiest thing to do here. If you don't respect this rule, you might cause crashes, it will also open a security hole.
Just out of curiosity, what's the security hole?
Matt Nordhoff
Wladimir Palant

Post by Wladimir Palant »

Sorry, I better don't tell this - Adblock is doing crazy stuff at times and it still has users.
Post Reply