Skip to content

Instantly share code, notes, and snippets.

@sauravtom
Last active December 11, 2015 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sauravtom/4632186 to your computer and use it in GitHub Desktop.
Save sauravtom/4632186 to your computer and use it in GitHub Desktop.
Chrome app notes
Opening up a new tab with chrome app
------------------------------------
manifest.json
{
"name": "Alyssa",
"version": "2.0",
"manifest_version": 2,
"description": "Alyssa app",
"icons": { "128": "icon.png" },
"background": {
"scripts": ["background.js","jQuery-Knob-master/js/jquery.knob.js"]
//"page": "background.html"
},
"browser_action": {
"default_title": "",
"default_icon": "icon.png"
},
"permissions": [
"tabs","http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
]
}
background.js
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.create({'url': chrome.extension.getURL('jQuery-Knob-master/test.html')}, function(tab) {
// Tab opened.
});
});
background.html
your normal html page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment