There are two ways to open a new tab that has a URL clicked in popup.html.
Note: Without both of them, even if an user click a link, nothing occurs.
First, add target='_blank'
to A tags.
<a href='http://qiita.com/' target='_blank'>Qiita</a>
Second, use chrome.tabs.create
. This function can be used without requesting the 'tabs' permission in the manifest.json.
$(function() {
$('a').click(function() {
chrome.tabs.create({url: $(this).attr('href')});
return false;
});
});
The difference between them is whether the popup window is closed. The former close it and the later keep it opened.