Skip to content

Instantly share code, notes, and snippets.

@amazedkoumei
Created April 29, 2012 18:23
Show Gist options
  • Save amazedkoumei/2552427 to your computer and use it in GitHub Desktop.
Save amazedkoumei/2552427 to your computer and use it in GitHub Desktop.
chrome-ext-paga-action-template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<!-- some library if i need -->
<script type="text/javascript" src="./background.js"></script>
</head>
<body>
background.html
</body>
</html>
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
try {
chrome.pageAction.show(tabId);
} catch(e) {
// alert(e);
}
});
{
"name": "EXT NAME",
"version": "1.0",
"manifest_version": 2,
"description": "now making.",
"background": { "page": "background/background.html" },
"page_action" :
{
"default_icon" : "icon-19.png",
"default_title": "EXT NAME",
"default_popup": "background/popup.html"
},
"permissions" : [
"tabs"
],
"icons" : {
"48" : "icon-48.png",
"128" : "icon-128.png"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment