| OLD | NEW |
| 1 <div id="pageData-name" class="pageData">Match Patterns</div> | 1 <div id="pageData-name" class="pageData">Match Patterns</div> |
| 2 | 2 |
| 3 <p> | 3 <p> |
| 4 <a href="content_scripts.html">Content scripts</a> operate on | 4 <a href="content_scripts.html">Content scripts</a> operate on |
| 5 a set of URLs defined by match patterns. | 5 a set of URLs defined by match patterns. |
| 6 You can put one or more match patterns | 6 You can put one or more match patterns |
| 7 in the <code>"matches"</code> part of | 7 in the <code>"matches"</code> part of |
| 8 a content script's section of the manifest. | 8 a content script's section of the manifest. |
| 9 This page describes the match pattern syntax — | 9 This page describes the match pattern syntax — |
| 10 the rules you need to follow when you specify | 10 the rules you need to follow when you specify |
| 11 which URLs your content script affects. | 11 which URLs your content script affects. |
| 12 </p> | 12 </p> |
| 13 | 13 |
| 14 <p> | 14 <p> |
| 15 A match pattern is essentially a URL | 15 A match pattern is essentially a URL |
| 16 that begins with a permitted scheme (<code>http</code>, | 16 that begins with a permitted scheme (<code>http</code>, |
| 17 <code>https</code>, <code>file</code>, or <code>ftp</code>), | 17 <code>https</code>, <code>file</code>, or <code>ftp</code>), |
| 18 and that can contain '<code>*</code>' characters. | 18 and that can contain '<code>*</code>' characters. |
| 19 The special pattern | 19 The special pattern |
| 20 <code><all_urls></code> matches any URL | 20 <code><all_urls></code> matches any URL |
| 21 that starts with a permitted scheme. | 21 that starts with a permitted scheme. |
| 22 Each match pattern has 3 parts:</p> | 22 Each match pattern has 3 parts:</p> |
| 23 </p> | 23 </p> |
| 24 | 24 |
| 25 <ul> | 25 <ul> |
| 26 <li> <em>scheme</em> — | 26 <li> <em>scheme</em> — |
| 27 for example, <code>http</code> or <code>file</code> | 27 for example, <code>http</code> or <code>file</code> |
| 28 or <code>*</code> | 28 or <code>*</code> |
| 29 <p class="note"> |
| 30 <b>Note:</b> |
| 31 Access to <code>file</code> URLs isn't automatic. |
| 32 The user must visit the extensions management page |
| 33 and opt in to <code>file</code> access for each extension that requests it. |
| 34 </p> |
| 29 </li> | 35 </li> |
| 30 <li> <em>host</em> — | 36 <li> <em>host</em> — |
| 31 for example, <code>www.google.com</code> | 37 for example, <code>www.google.com</code> |
| 32 or <code>*.google.com</code> | 38 or <code>*.google.com</code> |
| 33 or <code>*</code>; | 39 or <code>*</code>; |
| 34 if the scheme is <code>file</code>, | 40 if the scheme is <code>file</code>, |
| 35 there is no <em>host</em> part | 41 there is no <em>host</em> part |
| 36 </li> | 42 </li> |
| 37 <li> <em>path</em> — | 43 <li> <em>path</em> — |
| 38 for example, <code>/*</code>, <code>/foo* </code>, | 44 for example, <code>/*</code>, <code>/foo* </code>, |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 <td> | 135 <td> |
| 130 http://example.org/foo/bar.html | 136 http://example.org/foo/bar.html |
| 131 </td> | 137 </td> |
| 132 </tr> | 138 </tr> |
| 133 | 139 |
| 134 <tr> | 140 <tr> |
| 135 <td> | 141 <td> |
| 136 <code>file:///foo*</code> | 142 <code>file:///foo*</code> |
| 137 </td> | 143 </td> |
| 138 | 144 |
| 139 <td>Matches any local file whose path starts with <code>/foo</code></td> | 145 <td>Matches any local file whose path starts with <code>/foo</code> |
| 146 </td> |
| 140 | 147 |
| 141 <td> | 148 <td> |
| 142 file:///foo/bar.html<br> | 149 file:///foo/bar.html<br> |
| 143 file:///foo | 150 file:///foo |
| 144 </td> | 151 </td> |
| 145 </tr> | 152 </tr> |
| 146 | 153 |
| 147 <tr> | 154 <tr> |
| 148 <td> | 155 <td> |
| 149 <code>http://127.0.0.1/*</code> | 156 <code>http://127.0.0.1/*</code> |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 <td>Missing <em>scheme</em> separator ("/" should be "//")</td> | 232 <td>Missing <em>scheme</em> separator ("/" should be "//")</td> |
| 226 </tr> | 233 </tr> |
| 227 | 234 |
| 228 <tr> | 235 <tr> |
| 229 <td><code>foo://*</code></td> | 236 <td><code>foo://*</code></td> |
| 230 <td>Invalid <em>scheme</em></td> | 237 <td>Invalid <em>scheme</em></td> |
| 231 </tr> | 238 </tr> |
| 232 </tbody> | 239 </tbody> |
| 233 </table> | 240 </table> |
| 234 | 241 |
| OLD | NEW |