| OLD | NEW |
| 1 <div id="pageData-title" class="pageData">Match Patterns</div> | 1 <div id="pageData-title" 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 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 it's in the <em>host</em> or the <em>path</em> part. | 45 it's in the <em>host</em> or the <em>path</em> part. |
| 46 If the <em>host</em> is just <code>*</code>, | 46 If the <em>host</em> is just <code>*</code>, |
| 47 then it matches any host. | 47 then it matches any host. |
| 48 If the <em>host</em> is <code>*.<em>hostname</em></code>, | 48 If the <em>host</em> is <code>*.<em>hostname</em></code>, |
| 49 then it matches the specified host or any of its subdomains. | 49 then it matches the specified host or any of its subdomains. |
| 50 In the <em>path</em> section, | 50 In the <em>path</em> section, |
| 51 each '<code>*</code>' matches 0 or more characters. | 51 each '<code>*</code>' matches 0 or more characters. |
| 52 The following table shows some valid patterns. | 52 The following table shows some valid patterns. |
| 53 </p> | 53 </p> |
| 54 | 54 |
| 55 <table> | 55 <table class="columns"> |
| 56 <tbody> | 56 <tbody> |
| 57 <tr> | 57 <tr> |
| 58 <th>Pattern</th> | 58 <th style="margin-left:0; padding-left:0">Pattern</th> |
| 59 <th>What it does</th> | 59 <th style="margin-left:0; padding-left:0">What it does</th> |
| 60 <th>Examples of matching URLs</th> | 60 <th style="margin-left:0; padding-left:0">Examples of matching URLs</th> |
| 61 </tr> | 61 </tr> |
| 62 | 62 |
| 63 <tr> | 63 <tr> |
| 64 <td> | 64 <td> |
| 65 <code>http://*/*</code> | 65 <code>http://*/*</code> |
| 66 </td> | 66 </td> |
| 67 | 67 |
| 68 <td>Matches any URL that uses the <code>http</code> scheme</td> | 68 <td>Matches any URL that uses the <code>http</code> scheme</td> |
| 69 | 69 |
| 70 <td> | 70 <td> |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 http://127.0.0.1/foo/bar.html | 147 http://127.0.0.1/foo/bar.html |
| 148 </td> | 148 </td> |
| 149 </tr> | 149 </tr> |
| 150 </tbody> | 150 </tbody> |
| 151 </table> | 151 </table> |
| 152 | 152 |
| 153 <p> | 153 <p> |
| 154 Here are some examples of <em>invalid</em> pattern matches: | 154 Here are some examples of <em>invalid</em> pattern matches: |
| 155 </p> | 155 </p> |
| 156 | 156 |
| 157 <table> | 157 <table class="columns"> |
| 158 <tbody> | 158 <tbody> |
| 159 <tr> | 159 <tr> |
| 160 <th>Bad pattern</th> | 160 <th style="margin-left:0; padding-left:0">Bad pattern</th> |
| 161 <th>Why it's bad</th> | 161 <th style="margin-left:0; padding-left:0">Why it's bad</th> |
| 162 </tr> | 162 </tr> |
| 163 | 163 |
| 164 <tr> | 164 <tr> |
| 165 <td><code>http://*</code></td> | 165 <td><code>http://*</code></td> |
| 166 <td>No <em>path</em></td> | 166 <td>No <em>path</em></td> |
| 167 </tr> | 167 </tr> |
| 168 | 168 |
| 169 <tr> | 169 <tr> |
| 170 <td><code>http://*foo/bar</code></td> | 170 <td><code>http://*foo/bar</code></td> |
| 171 <td>'*' in the <em>host</em> can be followed only by a '.' or '/'</td> | 171 <td>'*' in the <em>host</em> can be followed only by a '.' or '/'</td> |
| 172 </tr> | 172 </tr> |
| 173 | 173 |
| 174 <tr> | 174 <tr> |
| 175 <td><code>http://foo.*.bar/baz </code></td> | 175 <td><code>http://foo.*.bar/baz </code></td> |
| 176 <td>If '*' is in the <em>host</em>, it must be the first character</td> | 176 <td>If '*' is in the <em>host</em>, it must be the first character</td> |
| 177 </tr> | 177 </tr> |
| 178 | 178 |
| 179 <tr> | 179 <tr> |
| 180 <td><code>http:/bar</code></td> | 180 <td><code>http:/bar</code></td> |
| 181 <td>Missing <em>scheme</em> separator ("/" should be "//")</td> | 181 <td>Missing <em>scheme</em> separator ("/" should be "//")</td> |
| 182 </tr> | 182 </tr> |
| 183 | 183 |
| 184 <tr> | 184 <tr> |
| 185 <td><code>foo://*</code></td> | 185 <td><code>foo://*</code></td> |
| 186 <td>Invalid <em>scheme</em></td> | 186 <td>Invalid <em>scheme</em></td> |
| 187 </tr> | 187 </tr> |
| 188 </tbody> | 188 </tbody> |
| 189 </table> | 189 </table> |
| 190 | 190 |
| OLD | NEW |