I see nobody has posted it, so here is a very lightweight alternative - it redirects all known ad-hosting sites to 127.0.0.1
it's not as elegant as hiding the HTML elements, you see some question marks on the page if safari couldn't load the resource. but overall i'm pretty pleased and it gets the job done.