OLD | NEW |
1 <table class="intro"> | |
2 <tr> | |
3 <th scope="col"></th> | |
4 <th scope="col"></th> | |
5 </tr> | |
6 <tr> | |
7 <td><strong>Description:</strong></td> | |
8 <td>Use the <code>chrome.declarativeContent</code> module to take | |
9 actions depending on the content of a page, without requiring | |
10 permission to read the page's content (see <a | |
11 href="#usage">Usage</a>).</td> | |
12 </tr> | |
13 <tr> | |
14 <td><strong>Availability:</strong></td> | |
15 <td>Trunk</td> | |
16 </tr> | |
17 <tr> | |
18 <td><strong>Permissions:</strong></td> | |
19 <td><code>"declarativeContent"</code> | |
20 <!--TODO: Mention host permissions if/when some actions require them.--> | |
21 </td> | |
22 </tr> | |
23 <tr> | |
24 <td><strong>Learn more:</strong></td> | |
25 <td><a href="events.html">Declarative Events</a><br/> | |
26 The <a href="activeTab.html">activeTab</a> permission</td> | |
27 </tr> | |
28 </table> | |
29 | |
30 <h2 id="usage">Usage</h2> | 1 <h2 id="usage">Usage</h2> |
31 | 2 |
32 <p> | 3 <p> |
33 The Declarative Content API allows you to show your extension's | 4 The Declarative Content API allows you to show your extension's |
34 $ref:[pageAction page action] depending on the URL of a web page and | 5 $ref:[pageAction page action] depending on the URL of a web page and |
35 the CSS selectors its content matches, without needing to take a <a | 6 the CSS selectors its content matches, without needing to take a <a |
36 href="declare_permissions.html#host-permission">host permission</a> or | 7 href="declare_permissions.html#host-permission">host permission</a> or |
37 inject a <a href="content_scripts.html">content script</a>. Use the | 8 inject a <a href="content_scripts.html">content script</a>. Use the |
38 <a href="activeTab.html">activeTab</a> permission in order to be able | 9 <a href="activeTab.html">activeTab</a> permission in order to be able |
39 to interact with a page after the user clicks on your page action. | 10 to interact with a page after the user clicks on your page action. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 a faster matching algorithm. | 89 a faster matching algorithm. |
119 </p> | 90 </p> |
120 | 91 |
121 <p> | 92 <p> |
122 Combine the above rule with the <a href="activeTab.html">activeTab</a> | 93 Combine the above rule with the <a href="activeTab.html">activeTab</a> |
123 permission to create an extension that doesn't need any install-time | 94 permission to create an extension that doesn't need any install-time |
124 permissions but can invite the user to click its page action on | 95 permissions but can invite the user to click its page action on |
125 relevant pages and can run on those pages when the user clicks the | 96 relevant pages and can run on those pages when the user clicks the |
126 page action. | 97 page action. |
127 </p> | 98 </p> |
OLD | NEW |