Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: chrome/common/extensions/docs/static/match_patterns.html

Issue 6576036: Say that file: access requires user opt-in. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/docs/match_patterns.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 &mdash; 9 This page describes the match pattern syntax &mdash;
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>&lt;all_urls&gt;</code> matches any URL 20 <code>&lt;all_urls&gt;</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> &mdash; 26 <li> <em>scheme</em> &mdash;
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> &mdash; 36 <li> <em>host</em> &mdash;
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> &mdash; 43 <li> <em>path</em> &mdash;
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
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
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
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/match_patterns.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698