[Project_owners] Filtering Rule
Malte Kraus
firefox at maltekraus.de
Tue Jun 12 06:42:24 PDT 2007
InBasic schrieb:
> I want to create site filtering firefox extension :
Sounds like BlockSite to me:
https://addons.mozilla.org/de/firefox/addon/3145
>
> any body know any especial function used for filtering rules like:
> "http://www.windowsupdate.com /* " ,..
If you only want to check the host you can do something like this:
someString.indexOf("http://www.windowsupdate.com/") == 0;
If you need wildcards you probably have to use regular expressions,
maybe (depending on the expected number of rules) in conjunction with
some algorithms to speed things up, like in Adblock Plus:
http://adblockplus.org/blog/investigating-filter-matching-algorithms
More information about the Project_owners
mailing list