Created
April 29, 2012 18:23
-
-
Save amazedkoumei/2552427 to your computer and use it in GitHub Desktop.
chrome-ext-paga-action-template
This file contains 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
<!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> |
This file contains 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
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { | |
try { | |
chrome.pageAction.show(tabId); | |
} catch(e) { | |
// alert(e); | |
} | |
}); |
This file contains 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
{ | |
"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