There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Add stylesheet class-based blocking; add per-domain rule specificity
Another more or less rip-off of Firefox's adblock. Some ads are in a <div> with a telling classname, but only on a given domain (we don't want to block all classes called "leftNav"). So it would be pretty trivial to change the rules to
allow something like:
<rule action="block" target="class">leftNav</rule>
but to do so, we would want to be able to narrow by domain. So this would add two new things to <rule> elements:
1) "domain" attribute: this could be any qualified part of the domain (e.g. .com, .doubleclick.com, ads.doubleclick.com, etc). This would default to "*".
2) "target" attribute: this would default to "source" (which means script/link/image/frame sources, and OBJECT movie PARAMs (ugh), but could be set to be "class" instead (and maybe other things in the future.
If I'm going to do this, I might want to look into what the performance cost is on the current regex stuff. I am curious if I could speed things up a lot by replacing .NET's regex engine with my own handwritten globbing engine. We really only need globbing
anyway, and not full regular expressions.