Eric
Eric

Reputation: 97571

How can I include a link in a the popup of a google chrome extension?

I am experiencing some problems with a google chrome extension I have made. I've put this simple line of code at the top of the popup page:

<a href="http://www.google.com">google</a>

However, clicking on it yields no results. But I have someone else's extension that includes links in the popup in exactly the same way, and seems to work. Is there a permissions error of some kind here?

Upvotes: 2

Views: 364

Answers (1)

oldestlivingboy
oldestlivingboy

Reputation: 2994

Links behave a bit differently in extension popups than they do in ordinary tabs. In a popup, add target="_blank" (or an arbitrarily named target) to your anchor tags or use the tab API’s chrome.tabs.create method (which will require tabs permission in your manifest file).

Upvotes: 5

Related Questions