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

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

Issue 219213007: Remove .html extension from links (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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
OLDNEW
1 <h1>Match Patterns</h1> 1 <h1>Match Patterns</h1>
2 2
3 <p> 3 <p>
4 <a href="declare_permissions.html#host-permissions">Host 4 <a href="declare_permissions#host-permissions">Host
5 permissions</a> and <a href="content_scripts.html">content 5 permissions</a> and <a href="content_scripts">content
6 script</a> matching are based on a set of URLs defined by 6 script</a> matching are based on a set of URLs defined by
7 <dfn>match patterns</dfn>. A match pattern is essentially a 7 <dfn>match patterns</dfn>. A match pattern is essentially a
8 URL that begins with a permitted scheme (<code>http</code>, 8 URL that begins with a permitted scheme (<code>http</code>,
9 <code>https</code>, <code>file</code>, <code>ftp</code>, or 9 <code>https</code>, <code>file</code>, <code>ftp</code>, or
10 <code>chrome-extension</code>), 10 <code>chrome-extension</code>),
11 and that can contain '<code>*</code>' characters. 11 and that can contain '<code>*</code>' characters.
12 The special pattern 12 The special pattern
13 <code>&lt;all_urls&gt;</code> matches any URL 13 <code>&lt;all_urls&gt;</code> matches any URL
14 that starts with a permitted scheme. 14 that starts with a permitted scheme.
15 Each match pattern has 3 parts:</p> 15 Each match pattern has 3 parts:</p>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 <tr> 77 <tr>
78 <td> 78 <td>
79 <code>http://*/*</code> 79 <code>http://*/*</code>
80 </td> 80 </td>
81 81
82 <td>Matches any URL that uses the <code>http</code> scheme</td> 82 <td>Matches any URL that uses the <code>http</code> scheme</td>
83 83
84 <td> 84 <td>
85 http://www.google.com/<br> 85 http://www.google.com/<br>
86 http://example.org/foo/bar.html 86 http://example.org/foo/bar
87 </td> 87 </td>
88 </tr> 88 </tr>
89 89
90 <tr> 90 <tr>
91 <td> 91 <td>
92 <code>http://*/foo*</code> 92 <code>http://*/foo*</code>
93 </td> 93 </td>
94 94
95 <td> 95 <td>
96 Matches any URL that uses the <code>http</code> scheme, on any host, 96 Matches any URL that uses the <code>http</code> scheme, on any host,
97 as long as the path starts with <code>/foo</code> 97 as long as the path starts with <code>/foo</code>
98 </td> 98 </td>
99 99
100 <td> 100 <td>
101 http://example.com/foo/bar.html<br> 101 http://example.com/foo/bar<br>
102 http://www.google.com/foo<b></b> 102 http://www.google.com/foo<b></b>
103 </td> 103 </td>
104 </tr> 104 </tr>
105 105
106 <tr> 106 <tr>
107 <td> 107 <td>
108 <code>https://*.google.com/foo*bar </code> 108 <code>https://*.google.com/foo*bar </code>
109 </td> 109 </td>
110 110
111 <td> 111 <td>
112 Matches any URL that uses the <code>https</code> scheme, 112 Matches any URL that uses the <code>https</code> scheme,
113 is on a google.com host 113 is on a google.com host
114 (such as www.google.com, docs.google.com, or google.com), 114 (such as www.google.com, docs.google.com, or google.com),
115 as long as the path starts with <code>/foo</code> 115 as long as the path starts with <code>/foo</code>
116 and ends with <code>bar</code> 116 and ends with <code>bar</code>
117 </td> 117 </td>
118 118
119 <td> 119 <td>
120 http://www.google.com/foo/baz/bar<br> 120 http://www.google.com/foo/baz/bar<br>
121 http://docs.google.com/foobar 121 http://docs.google.com/foobar
122 </td> 122 </td>
123 </tr> 123 </tr>
124 124
125 <tr> 125 <tr>
126 <td> 126 <td>
127 <code>http://example.org/foo/bar.html </code> 127 <code>http://example.org/foo/bar </code>
128 </td> 128 </td>
129 129
130 <td>Matches the specified URL</td> 130 <td>Matches the specified URL</td>
131 131
132 <td> 132 <td>
133 http://example.org/foo/bar.html 133 http://example.org/foo/bar
134 </td> 134 </td>
135 </tr> 135 </tr>
136 136
137 <tr> 137 <tr>
138 <td> 138 <td>
139 <code>file:///foo*</code> 139 <code>file:///foo*</code>
140 </td> 140 </td>
141 141
142 <td>Matches any local file whose path starts with <code>/foo</code> 142 <td>Matches any local file whose path starts with <code>/foo</code>
143 </td> 143 </td>
144 144
145 <td> 145 <td>
146 file:///foo/bar.html<br> 146 file:///foo/bar<br>
147 file:///foo 147 file:///foo
148 </td> 148 </td>
149 </tr> 149 </tr>
150 150
151 <tr> 151 <tr>
152 <td> 152 <td>
153 <code>http://127.0.0.1/*</code> 153 <code>http://127.0.0.1/*</code>
154 </td> 154 </td>
155 155
156 <td> 156 <td>
157 Matches any URL that uses the <code>http</code> scheme 157 Matches any URL that uses the <code>http</code> scheme
158 and is on the host 127.0.0.1 158 and is on the host 127.0.0.1
159 </td> 159 </td>
160 <td> 160 <td>
161 http://127.0.0.1/<br> 161 http://127.0.0.1/<br>
162 http://127.0.0.1/foo/bar.html 162 http://127.0.0.1/foo/bar
163 </td> 163 </td>
164 </tr> 164 </tr>
165 165
166 <tr> 166 <tr>
167 <td> 167 <td>
168 <code>*://mail.google.com/* </code> 168 <code>*://mail.google.com/* </code>
169 </td> 169 </td>
170 170
171 <td> 171 <td>
172 Matches any URL that starts with 172 Matches any URL that starts with
(...skipping 11 matching lines...) Expand all
184 <td> 184 <td>
185 <code>chrome-extension://*/* </code> 185 <code>chrome-extension://*/* </code>
186 </td> 186 </td>
187 187
188 <td> 188 <td>
189 Matches any URL pointing to an extension (the first <code>*</code> 189 Matches any URL pointing to an extension (the first <code>*</code>
190 represents a filter for extension IDs, the second for paths). 190 represents a filter for extension IDs, the second for paths).
191 </td> 191 </td>
192 192
193 <td> 193 <td>
194 chrome-extension://askla...asdf/options.html 194 chrome-extension://askla...asdf/options
195 </td> 195 </td>
196 </tr> 196 </tr>
197 197
198 <tr> 198 <tr>
199 <td> 199 <td>
200 <code>&lt;all_urls&gt;</code> 200 <code>&lt;all_urls&gt;</code>
201 </td> 201 </td>
202 202
203 <td> 203 <td>
204 Matches any URL that uses a permitted scheme. 204 Matches any URL that uses a permitted scheme.
205 (See the beginning of this section for the list of permitted 205 (See the beginning of this section for the list of permitted
206 schemes.) 206 schemes.)
207 </td> 207 </td>
208 <td> 208 <td>
209 http://example.org/foo/bar.html<br> 209 http://example.org/foo/bar<br>
210 file:///bar/baz.html 210 file:///bar/baz
211 </td> 211 </td>
212 </tr> 212 </tr>
213 </tbody> 213 </tbody>
214 </table> 214 </table>
215 215
216 <p> 216 <p>
217 Here are some examples of <em>invalid</em> pattern matches: 217 Here are some examples of <em>invalid</em> pattern matches:
218 </p> 218 </p>
219 219
220 <table class="simple"> 220 <table class="simple">
(...skipping 26 matching lines...) Expand all
247 <tr> 247 <tr>
248 <td><code>foo://*</code></td> 248 <td><code>foo://*</code></td>
249 <td>Invalid <em>scheme</em></td> 249 <td>Invalid <em>scheme</em></td>
250 </tr> 250 </tr>
251 </tbody> 251 </tbody>
252 </table> 252 </table>
253 253
254 <p> 254 <p>
255 Some schemes are not supported in all contexts. 255 Some schemes are not supported in all contexts.
256 </p> 256 </p>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698