OLD | NEW |
1 <!-- BEGIN AUTHORED CONTENT --> | |
2 <p id="classSummary"> | 1 <p id="classSummary"> |
3 Use the <code>chrome.history</code> module to interact with the | 2 Use the <code>chrome.history</code> module to interact with the |
4 browser's record of visited pages. You can add, remove, and query | 3 browser's record of visited pages. You can add, remove, and query |
5 for URLs in the browser's history. | 4 for URLs in the browser's history. |
6 To override the history page with your own version, see | 5 To override the history page with your own version, see |
7 <a href="override.html">Override Pages</a>. | 6 <a href="override.html">Override Pages</a>. |
8 </p> | 7 </p> |
| 8 |
9 <h2 id="manifest">Manifest</h2> | 9 <h2 id="manifest">Manifest</h2> |
| 10 |
10 <p>You must declare the "history" permission | 11 <p>You must declare the "history" permission |
11 in the <a href="manifest.html">extension manifest</a> | 12 in the <a href="manifest.html">extension manifest</a> |
12 to use the history API. | 13 to use the history API. |
13 For example:</p> | 14 For example:</p> |
14 <pre>{ | 15 <pre>{ |
15 "name": "My extension", | 16 "name": "My extension", |
16 ... | 17 ... |
17 <b>"permissions": [ | 18 <b>"permissions": [ |
18 "history" | 19 "history" |
19 ]</b>, | 20 ]</b>, |
20 ... | 21 ... |
21 }</pre> | 22 }</pre> |
| 23 |
22 <h2 id="transition_types">Transition types</h2> | 24 <h2 id="transition_types">Transition types</h2> |
| 25 |
23 <p> | 26 <p> |
24 The history API uses a <em>transition type</em> to describe | 27 The history API uses a <em>transition type</em> to describe |
25 how the browser navigated to a particular URL | 28 how the browser navigated to a particular URL |
26 on a particular visit. | 29 on a particular visit. |
27 For example, if a user visits a page | 30 For example, if a user visits a page |
28 by clicking a link on another page, | 31 by clicking a link on another page, |
29 the transition type is "link". | 32 the transition type is "link". |
30 </p> | 33 </p> |
| 34 |
31 <p> | 35 <p> |
32 The following table describes each transition type. | 36 The following table describes each transition type. |
33 </p> | 37 </p> |
| 38 |
34 <table> | 39 <table> |
35 <tr> | 40 <tr> |
36 <th> Transition type </th> <th> Description </th> | 41 <th> Transition type </th> <th> Description </th> |
37 </tr> | 42 </tr> |
38 <tr id="tt_link"> | 43 <tr id="tt_link"> |
39 <td>"link"</td> | 44 <td>"link"</td> |
40 <td> | 45 <td> |
41 The user got to this page by clicking a link on another page. | 46 The user got to this page by clicking a link on another page. |
42 </td> | 47 </td> |
43 </tr> | 48 </tr> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 </td> | 134 </td> |
130 </tr> | 135 </tr> |
131 <tr id="tt_keyword_generated"> | 136 <tr id="tt_keyword_generated"> |
132 <td>"keyword_generated"</td> | 137 <td>"keyword_generated"</td> |
133 <td> | 138 <td> |
134 Corresponds to a visit generated for a keyword. | 139 Corresponds to a visit generated for a keyword. |
135 See also <a href="#tt_keyword">keyword</a>. | 140 See also <a href="#tt_keyword">keyword</a>. |
136 </td> | 141 </td> |
137 </tr> | 142 </tr> |
138 </table> | 143 </table> |
| 144 |
139 <h2 id="examples">Examples</h2> | 145 <h2 id="examples">Examples</h2> |
| 146 |
140 <p> | 147 <p> |
141 For examples of using this API, see the | 148 For examples of using this API, see the |
142 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/history/">history sample directory</a> and the | 149 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/history/">history sample directory</a> and the |
143 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extens
ions/api_test/history/">history API test directory</a>. | 150 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extens
ions/api_test/history/">history API test directory</a>. |
144 For other examples and for help in viewing the source code, see | 151 For other examples and for help in viewing the source code, see |
145 <a href="samples.html">Samples</a>. | 152 <a href="samples.html">Samples</a>. |
146 </p> | 153 </p> |
147 <!-- END AUTHORED CONTENT --> | |
OLD | NEW |