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

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

Issue 8309001: Adding `content_security_policy` to a few sample extensions. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: License and whitespace. Created 9 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 | Annotate | Revision Log
OLDNEW
1 <!doctype html>
1 <html> 2 <html>
2 <head> 3 <head>
3 <script> 4 <title>Background Page</title>
4 var min = 1; 5 <script src="background.js"></script>
5 var max = 5; 6 </head>
6 var current = min; 7 <body>
7 8 </body>
8 function updateIcon() {
9 chrome.browserAction.setIcon({path:"icon" + current + ".png"});
10 current++;
11
12 if (current > max)
13 current = min;
14 }
15
16 chrome.browserAction.onClicked.addListener(updateIcon);
17 updateIcon();
18 </script>
19 </head>
20 </html> 9 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698