diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-16 09:14:18 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-16 09:14:18 +0000 |
commit | 0e02540c5d729c4901638b9de2649f34916ccf0b (patch) | |
tree | 115b88e2adc0a9aef73c49209db25831a13c8faf /chrome | |
parent | 81f356885202b9ad86c87af217179f5c1ac1a6e2 (diff) | |
download | chromium_src-0e02540c5d729c4901638b9de2649f34916ccf0b.zip chromium_src-0e02540c5d729c4901638b9de2649f34916ccf0b.tar.gz chromium_src-0e02540c5d729c4901638b9de2649f34916ccf0b.tar.bz2 |
Merge 33621 - Move make_page_red extensions from make_page_red/make_page_red to just make_page_red
Review URL: http://codereview.chromium.org/465015
TBR=estade@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@34694 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
3 files changed, 30 insertions, 0 deletions
diff --git a/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/background.html b/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/background.html new file mode 100644 index 0000000..875ea31 --- /dev/null +++ b/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/background.html @@ -0,0 +1,18 @@ +<html> +<head> +<script> + // Called when the user clicks on the browser action. + chrome.browserAction.onClicked.addListener(function(tab) { + chrome.tabs.executeScript(null, {code:"document.body.bgColor='red'"}); + }); + + chrome.browserAction.setBadgeBackgroundColor({color:[0, 200, 0, 100]}); + + var i = 0; + window.setInterval(function() { + chrome.browserAction.setBadgeText({text:String(i)}); + i++; + }, 10); +</script> +</head> +</html> diff --git a/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/icon.png b/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/icon.png Binary files differnew file mode 100755 index 0000000..9a79a46 --- /dev/null +++ b/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/icon.png diff --git a/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/manifest.json b/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/manifest.json new file mode 100755 index 0000000..6bb35c6 --- /dev/null +++ b/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/manifest.json @@ -0,0 +1,12 @@ +{ + "name": "A browser action with no icon that makes the page red", + "version": "1.0", + "background_page": "background.html", + "permissions": [ + "tabs", "http://*/*" + ], + "browser_action": { + "name": "Make this page red", + "icons": ["icon.png"] + } +}
\ No newline at end of file |