| OLD | NEW |
| 1 <!doctype html> |
| 1 <html> | 2 <html> |
| 2 <head> | 3 <head> |
| 3 <script> | 4 <title>Background Page</title> |
| 4 // Called when the user clicks on the browser action. | 5 <script src="background.js"></script> |
| 5 chrome.browserAction.onClicked.addListener(function(tab) { | 6 </head> |
| 6 chrome.tabs.executeScript( | 7 <body> |
| 7 null, {code:"document.body.style.background='red !important'"}); | 8 </body> |
| 8 }); | |
| 9 | |
| 10 chrome.browserAction.setBadgeBackgroundColor({color:[0, 200, 0, 100]}); | |
| 11 | |
| 12 var i = 0; | |
| 13 window.setInterval(function() { | |
| 14 chrome.browserAction.setBadgeText({text:String(i)}); | |
| 15 i++; | |
| 16 }, 10); | |
| 17 </script> | |
| 18 </head> | |
| 19 </html> | 9 </html> |
| OLD | NEW |