OLD | NEW |
1 <!-- BEGIN AUTHORED CONTENT --> | |
2 <p> | 1 <p> |
3 Use page actions to put icons inside the address bar. | 2 Use page actions to put icons inside the address bar. |
4 Page actions represent actions | 3 Page actions represent actions |
5 that can be taken on the current page, | 4 that can be taken on the current page, |
6 but that aren't applicable to all pages. | 5 but that aren't applicable to all pages. |
7 Some examples: | 6 Some examples: |
8 </p> | 7 </p> |
9 <ul> | 8 <ul> |
10 <li> Subscribe to this page's RSS feed </li> | 9 <li> Subscribe to this page's RSS feed </li> |
11 <li> Make a slideshow out of this page's photos </li> | 10 <li> Make a slideshow out of this page's photos </li> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 <a href="#method-show">show()</a> and | 57 <a href="#method-show">show()</a> and |
59 <a href="#method-hide">hide()</a> methods, respectively. | 58 <a href="#method-hide">hide()</a> methods, respectively. |
60 By default, a page action is hidden. | 59 By default, a page action is hidden. |
61 When you show it, you specify the tab | 60 When you show it, you specify the tab |
62 in which the icon should appear. | 61 in which the icon should appear. |
63 The icon remains visible | 62 The icon remains visible |
64 until the tab is closed | 63 until the tab is closed |
65 or starts displaying a different URL | 64 or starts displaying a different URL |
66 (because the user clicks a link, for example). | 65 (because the user clicks a link, for example). |
67 </p> | 66 </p> |
68 <!-- [PENDING: We should discuss how tabs and page actions are related. All met
hods take a tab ID argument. How do you get that tab ID? What's the usual way
of arranging the code that monitors pages? Point to examples.] --> | |
69 <h2 id="tips">Tips</h2> | 67 <h2 id="tips">Tips</h2> |
70 <p>For the best visual impact, | 68 <p>For the best visual impact, |
71 follow these guidelines:</p> | 69 follow these guidelines:</p> |
72 <ul> | 70 <ul> |
73 <li><b>Do</b> use page actions | 71 <li><b>Do</b> use page actions |
74 for features that make sense | 72 for features that make sense |
75 for only a few pages. | 73 for only a few pages. |
76 <li><b>Don't</b> use page actions | 74 <li><b>Don't</b> use page actions |
77 for features that make sense | 75 for features that make sense |
78 for most pages. | 76 for most pages. |
79 Use <a href="browserAction.html">browser actions</a> instead. | 77 Use <a href="browserAction.html">browser actions</a> instead. |
80 <li><b>Don't</b> constantly animate your icon. | 78 <li><b>Don't</b> constantly animate your icon. |
81 That's just annoying. | 79 That's just annoying. |
82 </ul> | 80 </ul> |
83 <h2 id="examples"> Examples </h2> | 81 <h2 id="examples"> Examples </h2> |
84 <p> | 82 <p> |
85 You can find simple examples of using page actions in the | 83 You can find simple examples of using page actions in the |
86 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/pageAction/">examples/api/pageAction</a> | 84 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/pageAction/">examples/api/pageAction</a> |
87 directory. | 85 directory. |
88 For other examples and for help in viewing the source code, see | 86 For other examples and for help in viewing the source code, see |
89 <a href="samples.html">Samples</a>. | 87 <a href="samples.html">Samples</a>. |
90 </p> | 88 </p> |
91 <!-- END AUTHORED CONTENT --> | |
OLD | NEW |