"put here because KHTMLPartPrivate, is not initialiazed when plugins is called" Won't this break bc? I'm not a good developer, so everything I say will probably be wrong. +void KHTMLPart::insertBlacklistUrl( const QString &url , bool is_regexp) It's not immediately clear to me whether url is the pretty version, or the encoded version. From the code, I see it's the encoded version (url.url()). Maybe this is obvious by everyone that would use the function? Also doing url.url() will give you all the stuff after the ? (like url="foo" will match http://asdf/search?this=foo;that=bar ) is this intentional? (consider where foo is a website name like google links) Just my thoughts JohnFlux On Thursday 09 December 2004 14:31, Luc Saillard wrote: > Hi, > > I want to be able to block some urls in Konqueror (or any application that > use KHTML) like adblock do for Mozilla suite. > > I look into the source code of KHTML and try to see where i can put a hook > to allow, or deny loading data from the web. I use the DocLoader class to > deny accessing the data. I see that a security control is already in place. > For this first patch, i don't want to be so intrusive. Then i declare 3 > methods to add, remove, and test urls in KHTMLPart class. I want to put > the urls list in the KHTMLPartPrivate class, but this class isn't > initialised when plugins is loaded by Konqueror (or the KHTML class). This > list is put in the private area of KHTMLPart. > > I want to know if this patch is correct, and can be included in the kdelibs > for the next kde release. I've already a small plugin to use this new API, > to show the result. > > Example: > > to block an url just do: > > if( !parent() || !parent()->inherits("KHTMLPart")) > return; > KHTMLPart *part = static_cast( parent() ); > > > part->insertBlacklistUrl(QString("http://a.as-eu.falkag.net/dat/dlv"),false >); > > Luc >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<