DarkLeafyGreen
DarkLeafyGreen

Reputation: 70406

How to use google adsense in google chrome extensions?

I included some adsense code in my google chrome extension popup file. Unfortunately this is not working. No window is opend when clicking on the link.

Regular links do not work in google chrome extensions. To open new tabs this code is needed:

$('#test').live('click', function(){
 chrome.tabs.create({'url': 'http://www.stackoverflow.com'}, function(tab) {
     // Tab opened.
 });
});

So how do I use adsense in google chrome extensions?

Upvotes: 3

Views: 2031

Answers (2)

Dominic
Dominic

Reputation: 3473

It's not allowed to place AdSense ads in your Chrome extensions. I just wanted to mention that, so that your extension doesn't get blocked by Google.

Source: http://support.google.com/adsense/bin/answer.py?hl=en&answer=1346295#Ads_in_a_software_application

Upvotes: 1

serg
serg

Reputation: 111255

Try to add <base target="_blank" /> tag into <head> of your popup.

Upvotes: 2

Related Questions