I've been working on something to block ads (or rather hide them) utilizing plain javascript. For ads specific to a website using something like this:
document.querySelector("img[src*='domain.com/path/to/ad/']").style.display="none" Actually works to find the specific image and hide it. However, google seems to be inserting their ads in an iframe that contains it's own document with a header/body/footer. It looks like this:

I haven't been able to find a way to select the adsense ad and do something with it. How would you go about selecting anything within that block?