Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: chrome/test/data/extensions/samples/make_page_red/background.html

Issue 264046: Update browser actions api to be like new design doc. (Closed)
Patch Set: rebase Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 // Called when the user clicks on the browser action. 4 // Called when the user clicks on the browser action.
5 chrome.browserAction.onClicked.addListener(function(windowId) { 5 chrome.browserAction.onClicked.addListener(function(tab) {
6 chrome.tabs.executeScript(null, {code:"document.body.bgColor='red'"}); 6 chrome.tabs.executeScript(null, {code:"document.body.bgColor='red'"});
7 }); 7 });
8 8
9 chrome.browserAction.setBadgeBackgroundColor([100, 0, 200, 0]); 9 chrome.browserAction.setBadgeBackgroundColor({color:[100, 0, 200, 0]});
10 10
11 var i = 0; 11 var i = 0;
12 window.setInterval(function() { 12 window.setInterval(function() {
13 chrome.browserAction.setBadgeText(String(i)); 13 chrome.browserAction.setBadgeText({text:String(i)});
14 i++; 14 i++;
15 }, 10); 15 }, 10);
16 </script> 16 </script>
17 </head> 17 </head>
18 </html> 18 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698