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

Side by Side Diff: chrome/common/extensions/docs/examples/api/browserAction/make_page_red/background.html

Issue 8318001: Adding `content_security_policy` to a few sample extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Docs. Zips. Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698