There will be an icon in Chrome's extension bar, I'd like to ope开发者_C百科n a link in a new tab when the icon is clicked(instead of popup a popup page). How could I do that?
In your background page:
chrome.browserAction.onClicked.addListener(function() {
chrome.tabs.create({url: "http://www.google.com"});
});
Google documentation for
chrome.browserAction.onClicked
chrome.tabs.create
精彩评论