How to use google adsense in google chrome extensions?

I have included some AdSense code in my Google Chrome extension popup file. Unfortunately this does not work. The window does not open when you click on the link.

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

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

So how to use adsense in google chrome extensions?

+3
source share
2 answers

Try adding a tag <base target="_blank" />to <head>your popup.

+2
source

You cannot place AdSense ads in Chrome extensions. I just wanted to mention this, so your extension is not blocked by Google.

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

+1

Source: https://habr.com/ru/post/1787420/


All Articles