I wrote a sample extension to add a new tab to the background in Chrome, it does not work. I'm new in chrome extensions, can you please help me? "My Extension", "Details": "Test Extension", "Version": "
manifest.json
{" manifest_version "}: 2," name " 1.0 "," Background ": {" page ":" bg.html "}," Permissions ": [" History "," Tab "]," Browser_Applications ": {" Default_icon ":" icon.png "}} < / Code>
bg.html
ChromeBrowser Action.Closed.AlList (function (active tab) {var newURL = "www.google.com"; chrome Tabs.create ({url: newURL})}};
bg Try changing the name of to html
Bg.js
and thus the manifest type Change the Background Announcement
manifest.json:
... "background": {"script": ["bg.js" ]}, ...
bg.js:
Chrome BrowserAction.onClicked.addListener (function (activeTab) { Var newURL = "www.google.com"; chrome.tabs.create ({url: newURL});});
Comments
Post a Comment