Why do I not normally use privoxy? I'm not sure. It's so easy, I really have no excuse:
apt-get install privoxy
Tell your browser to use localhost:8118 as a proxy.
Looking at the manual talking about it being a "black art" makes me think that at least ad-blocking is a perfect setup for machine learning: allow the user to flag images they wish were blocked, and then use features like the image source hostname, image URL components, image dimensions, as well as the target hostname (e.g., there are no banners on livejournal.com, so if they have bannery-looking things they're still not banners) to train a system. Then you (maybe?) wouldn't need a config system that lets me tweak rules manually...