Last active
December 11, 2015 17:08
-
-
Save sauravtom/4632186 to your computer and use it in GitHub Desktop.
Chrome app notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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