In my Stackoverflow folder, I have stackoverflow.ico and 2 bellow files. When you import it into Chrome, it shows an icon in the address bar, but when I click on it, Chrome does not open any new tabs. What am I doing wrong?
manifest.json
{ "name": "Stackoverflow", "version": "1", "browser_action": { "default_icon": "stackoverflow.ico" }, "background": { "page": "index.html" }, "permissions": ["tabs"], "manifest_version": 2 }
index.html
<html> <head> <script> chrome.browserAction.onClicked.addListener(function(activeTab) { var newURL = "http://stackoverflow.com/"; chrome.tabs.create({ url: newURL }); }); </script> </head> </html>
javascript html google-chrome google-chrome-extension tabs
Sakura May 12 '13 at 3:22 a.m. 2013-05-12 03:22
source share