But it shows no ads. Of course, I set manifest file’s “matches” field correctly, I have experience with content scripts, but never worked with AdSense.
And yes, I know Google is not affirmative with this way of inserting ads, but I do this for an friend who thinks it is OK, so I don’t care, I just wish to show his ads in that div.
Actually i try to insert AdSense ads into all facebook pages. So I get an div with getElementById(that element’s id), and try with changing it’s innerHTML. I can change it’s HTML to show text, i.e. writing div.innerHTML = “random text” outputs random text inside of it, but when I try to show an adsense ad instead of that simple text, nothing happens.
Anyway there’s little point in using a browser extension for inserting ads into pages as the only person who will see them if you ever did get it to work would be you.