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

Side by Side Diff: chrome/common/extensions/docs/examples/tutorials/analytics/popup.html

Issue 9212044: Improving `content_security_policy` documentation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Meggin's feedback. Created 8 years, 11 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 <!DOCTYPE html>
2 <!-- 2 <!--
3 * Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 3 * Copyright (c) 2012 The Chromium Authors. All rights reserved. Use of this
4 * source code is governed by a BSD-style license that can be found in the 4 * source code is governed by a BSD-style license that can be found in the
5 * LICENSE file. 5 * LICENSE file.
6 --> 6 -->
7 <html> 7 <html>
8 <head> 8 <head>
9 <style> 9 <style>
10 body { 10 body {
11 width: 300px; 11 width: 300px;
12 color: #000; 12 color: #000;
13 font-family: Arial; 13 font-family: Arial;
14 } 14 }
15 #output { 15 #output {
16 color: #d00; 16 color: #d00;
17 text-align: center; 17 text-align: center;
18 } 18 }
19 </style> 19 </style>
20 <script src="popup.js"></script>
20 </head> 21 </head>
21 <body> 22 <body>
22 <script src="analytics.js"></script>
23 <script>
24 /**
25 * Tracks a single button click. You can use the _trackEvent command
26 * to track user interactions with different parts of your extension.
27 */
28 function trackButton(button_id) {
29 _gaq.push(['_trackEvent', 'button' + button_id, 'clicked']);
30 }
31 </script>
32 <h1>Popup</h1> 23 <h1>Popup</h1>
33 <p>Track the following actions:</p> 24 <p>Track the following actions:</p>
34 <button onclick="trackButton(1);">Button 1</button> 25 <button id='button1'>Button 1</button>
35 <button onclick="trackButton(2);">Button 2</button> 26 <button id='button2'>Button 2</button>
36 <button onclick="trackButton(3);">Button 3</button> 27 <button id='button3'>Button 3</button>
37 <button onclick="trackButton(4);">Button 4</button> 28 <button id='button4'>Button 4</button>
38 <button onclick="trackButton(5);">Button 5</button> 29 <button id='button5'>Button 5</button>
39 <button onclick="trackButton(6);">Button 6</button> 30 <button id='button6'>Button 6</button>
40 </body> 31 </body>
41 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698