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

Side by Side Diff: chrome/common/extensions/docs/templates/articles/options.html

Issue 11138025: Merge 161972 - Add missing </script> tag to options page code sample. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1229/src/
Patch Set: Created 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <h1>Options</h1> 1 <h1>Options</h1>
2 2
3 <p>To allow users to customize the behavior of your extension, you may wish to p rovide an options page. If you do, a link to it will be provided from the extens ions management page at chrome://extensions. Clicking the Options link opens a n ew tab pointing at your options page. 3 <p>To allow users to customize the behavior of your extension, you may wish to p rovide an options page. If you do, a link to it will be provided from the extens ions management page at chrome://extensions. Clicking the Options link opens a n ew tab pointing at your options page.
4 4
5 <h2 id="step_1">Step 1: Declare your options page in the manifest</h2> 5 <h2 id="step_1">Step 1: Declare your options page in the manifest</h2>
6 6
7 <pre>{ 7 <pre>{
8 "name": "My extension", 8 "name": "My extension",
9 ... 9 ...
10 <b>"options_page": "options.html"</b>, 10 <b>"options_page": "options.html"</b>,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 } 48 }
49 } 49 }
50 document.addEventListener('DOMContentReady', restore_options); 50 document.addEventListener('DOMContentReady', restore_options);
51 document.querySelector('#save').addEventListener('click', save_options); 51 document.querySelector('#save').addEventListener('click', save_options);
52 </pre> 52 </pre>
53 53
54 <pre> 54 <pre>
55 &lt;html> 55 &lt;html>
56 &lt;head>&lt;title>My Test Extension Options&lt;/title>&lt;/head> 56 &lt;head>&lt;title>My Test Extension Options&lt;/title>&lt;/head>
57 &lt;script src="options.js"> 57 &lt;script src="options.js">&lt;/script>
58 58
59 &lt;body> 59 &lt;body>
60 60
61 Favorite Color: 61 Favorite Color:
62 &lt;select id="color"> 62 &lt;select id="color">
63 &lt;option value="red">red&lt;/option> 63 &lt;option value="red">red&lt;/option>
64 &lt;option value="green">green&lt;/option> 64 &lt;option value="green">green&lt;/option>
65 &lt;option value="blue">blue&lt;/option> 65 &lt;option value="blue">blue&lt;/option>
66 &lt;option value="yellow">yellow&lt;/option> 66 &lt;option value="yellow">yellow&lt;/option>
67 &lt;/select> 67 &lt;/select>
68 68
69 &lt;br> 69 &lt;br>
70 &lt;div id="status">&lt;/div> 70 &lt;div id="status">&lt;/div>
71 &lt;button id="save">Save&lt;/button> 71 &lt;button id="save">Save&lt;/button>
72 &lt;/body> 72 &lt;/body>
73 &lt;/html> 73 &lt;/html>
74 </pre> 74 </pre>
75 75
76 <h2 id="important_notes">Important notes</h2> 76 <h2 id="important_notes">Important notes</h2>
77 <ul> 77 <ul>
78 <li>We plan on providing some default css styles to encourage a consistent look across different extensions' options pages. You can star <a href="http://crbug.c om/25317">crbug.com/25317</a> to be notified of updates.</li> 78 <li>We plan on providing some default css styles to encourage a consistent look across different extensions' options pages. You can star <a href="http://crbug.c om/25317">crbug.com/25317</a> to be notified of updates.</li>
79 </ul> 79 </ul>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698