| OLD | NEW |
| 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: | 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: |
| 2 1) The <head> information in this page is significant, should be uniform | 2 1) The <head> information in this page is significant, should be uniform |
| 3 across api docs and should be edited only with knowledge of the | 3 across api docs and should be edited only with knowledge of the |
| 4 templating mechanism. | 4 templating mechanism. |
| 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a |
| 6 browser, it will be re-generated from the template, json schema and | 6 browser, it will be re-generated from the template, json schema and |
| 7 authored overview content. | 7 authored overview content. |
| 8 4) The <body>.innerHTML is also generated by an offline step so that this | 8 4) The <body>.innerHTML is also generated by an offline step so that this |
| 9 page may easily be indexed by search engines. | 9 page may easily be indexed by search engines. |
| 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> |
| 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> | 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> |
| 13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> | 13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> |
| 14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla
te_compiled.js"> | 14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla
te_compiled.js"> |
| 15 </script> | 15 </script> |
| 16 <script type="text/javascript" src="js/api_page_generator.js"></script> | 16 <script type="text/javascript" src="js/api_page_generator.js"></script> |
| 17 <script type="text/javascript" src="js/bootstrap.js"></script> | 17 <script type="text/javascript" src="js/bootstrap.js"></script> |
| 18 <script type="text/javascript" src="js/sidebar.js"></script> | 18 <script type="text/javascript" src="js/sidebar.js"></script> |
| 19 <title>chrome.contentSettings - Google Chrome Extensions - Google Code</title>
</head> | 19 <title>Content Settings - Google Chrome Extensions - Google Code</title></head
> |
| 20 <body> <div id="gc-container" class="labs"> | 20 <body> <div id="gc-container" class="labs"> |
| 21 <div id="devModeWarning"> | 21 <div id="devModeWarning"> |
| 22 You are viewing extension docs in chrome via the 'file:' scheme: are you
expecting to see local changes when you refresh? You'll need run chrome with --
allow-file-access-from-files. | 22 You are viewing extension docs in chrome via the 'file:' scheme: are you
expecting to see local changes when you refresh? You'll need run chrome with --
allow-file-access-from-files. |
| 23 </div> | 23 </div> |
| 24 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> | 24 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> |
| 25 <!-- In particular, sub-templates that recurse, must be used by allowing | 25 <!-- In particular, sub-templates that recurse, must be used by allowing |
| 26 jstemplate to make a copy of the template in this section which | 26 jstemplate to make a copy of the template in this section which |
| 27 are not operated on by way of the jsskip="true" --> | 27 are not operated on by way of the jsskip="true" --> |
| 28 <div style="display:none"> | 28 <div style="display:none"> |
| 29 | 29 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 </ul> | 244 </ul> |
| 245 </li> | 245 </li> |
| 246 </ul> | 246 </ul> |
| 247 </div> | 247 </div> |
| 248 <script> | 248 <script> |
| 249 initToggles(); | 249 initToggles(); |
| 250 </script> | 250 </script> |
| 251 | 251 |
| 252 <div class="g-unit" id="gc-pagecontent"> | 252 <div class="g-unit" id="gc-pagecontent"> |
| 253 <div id="pageTitle"> | 253 <div id="pageTitle"> |
| 254 <h1 class="page_title">chrome.contentSettings</h1> | 254 <h1 class="page_title">Content Settings</h1> |
| 255 </div> | 255 </div> |
| 256 <!-- TABLE OF CONTENTS --> | 256 <!-- TABLE OF CONTENTS --> |
| 257 <div id="toc"> | 257 <div id="toc"> |
| 258 <h2>Contents</h2> | 258 <h2>Contents</h2> |
| 259 <ol> | 259 <ol> |
| 260 <li style="display: none; "> | 260 <li> |
| 261 <a>h2Name</a> | 261 <a href="#patterns">Content Setting Patterns</a> |
| 262 <ol> | 262 <ol> |
| 263 <li> | 263 <li> |
| 264 <a href="#pattern-precedence">Pattern Precedence</a> |
| 265 </li> |
| 266 </ol> |
| 267 </li><li> |
| 268 <a href="#resourceIdentifiers">Resource Identifiers</a> |
| 269 <ol> |
| 270 <li style="display: none; "> |
| 264 <a>h3Name</a> | 271 <a>h3Name</a> |
| 265 </li> | 272 </li> |
| 266 </ol> | 273 </ol> |
| 274 </li><li> |
| 275 <a href="#manifest">Manifest</a> |
| 276 <ol> |
| 277 <li style="display: none; "> |
| 278 <a>h3Name</a> |
| 279 </li> |
| 280 </ol> |
| 281 </li><li> |
| 282 <a href="#examples">Examples</a> |
| 283 <ol> |
| 284 <li style="display: none; "> |
| 285 <a>h3Name</a> |
| 286 </li> |
| 287 </ol> |
| 267 </li> | 288 </li> |
| 268 <li> | 289 <li> |
| 269 <a href="#apiReference">API reference: chrome.contentSettings</a
> | 290 <a href="#apiReference">API reference: chrome.contentSettings</a
> |
| 270 <ol> | 291 <ol> |
| 271 <li> | 292 <li> |
| 272 <a href="#properties">Properties</a> | 293 <a href="#properties">Properties</a> |
| 273 <ol> | 294 <ol> |
| 274 <li> | 295 <li> |
| 275 <a href="#property-cookies">cookies</a> | 296 <a href="#property-cookies">cookies</a> |
| 276 </li><li> | 297 </li><li> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 </ol> | 338 </ol> |
| 318 </div> | 339 </div> |
| 319 <!-- /TABLE OF CONTENTS --> | 340 <!-- /TABLE OF CONTENTS --> |
| 320 | 341 |
| 321 <!-- Standard content lead-in for experimental API pages --> | 342 <!-- Standard content lead-in for experimental API pages --> |
| 322 <p id="classSummary" style="display: none; "> | 343 <p id="classSummary" style="display: none; "> |
| 323 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. | 344 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. |
| 324 </p> | 345 </p> |
| 325 | 346 |
| 326 <!-- STATIC CONTENT PLACEHOLDER --> | 347 <!-- STATIC CONTENT PLACEHOLDER --> |
| 327 <div id="static"></div> | 348 <div id="static"><div id="pageData-name" class="pageData">Content Settin
gs</div> |
| 349 |
| 350 <!-- BEGIN AUTHORED CONTENT --> |
| 351 <p> |
| 352 The content settings module allows you |
| 353 to change settings that control whether websites can use features such as |
| 354 cookies, Javascript, and plug-ins. |
| 355 </p> |
| 356 |
| 357 <h2 id="patterns">Content Setting Patterns</h2> |
| 358 <p> |
| 359 You can set patterns that match multiple origins, like <code>youtube.com</code> |
| 360 and all subdomains. For details on the format of a pattern, see |
| 361 <a href="match_patterns.html">Match Patterns</a>.</p> |
| 362 <p> |
| 363 Note that there is a restriction on the pattern syntax: For <code>http</code>, |
| 364 <code>https</code> and <code>ftp</code> URLs the path has to be a wildcard |
| 365 (<code>/*</code>). For <code>file</code> URLs, the path has to be completely |
| 366 specified and is <strong>not</strong> allowed to contain wildcards. |
| 367 </p> |
| 368 |
| 369 <h3 id="pattern-precedence">Pattern Precedence</h3> |
| 370 <p> |
| 371 When more than one content setting rule applies for a given site, the rule with |
| 372 the more specific pattern takes precedence. |
| 373 </p> |
| 374 <p>For example, the pattern <code>http://*.example.com</code> (matching example.
com and all subdomains) is more specific than the pattern <code><all_urls>
</code> (matching every URL). Likewise, the pattern <code>http://www.example.com
</code> is more specific than <code>http://*.example.com</code>. |
| 375 </p> |
| 376 |
| 377 <h2 id="resourceIdentifiers">Resource Identifiers</h2> |
| 378 <p> |
| 379 Resource identifiers allow you to specify content settings for specific |
| 380 sub-types of a content type. Currently, the only content type that supports |
| 381 resource identifiers is <code>plugins</code>, where a resource identifier |
| 382 identifies a specific plug-in. When applying content settings, first the |
| 383 settings for the specific plug-in are checked. If there are no settings found |
| 384 for the specific plug-in, the general content settings for plug-ins are checked. |
| 385 </p> |
| 386 |
| 387 <h2 id="manifest">Manifest</h2> |
| 388 <p>You must declare the "contentSettings" permission |
| 389 in your extension's manifest to use the API.</p> |
| 390 |
| 391 <h2 id="examples">Examples</h2> |
| 392 |
| 393 <p> |
| 394 You can find samples of this API on the |
| 395 <a href="samples.html#contentSettings">sample page</a>. |
| 396 </p> |
| 397 |
| 398 <!-- END AUTHORED CONTENT --> |
| 399 </div> |
| 328 | 400 |
| 329 <!-- API PAGE --> | 401 <!-- API PAGE --> |
| 330 <div class="apiPage"> | 402 <div class="apiPage"> |
| 331 <a name="apiReference"></a> | 403 <a name="apiReference"></a> |
| 332 <h2>API reference: chrome.contentSettings</h2> | 404 <h2>API reference: chrome.contentSettings</h2> |
| 333 | 405 |
| 334 <!-- PROPERTIES --> | 406 <!-- PROPERTIES --> |
| 335 <div class="apiGroup"> | 407 <div class="apiGroup"> |
| 336 <a name="properties"></a> | 408 <a name="properties"></a> |
| 337 <h3 id="properties">Properties</h3> | 409 <h3 id="properties">Properties</h3> |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 </span> | 1021 </span> |
| 950 </span> | 1022 </span> |
| 951 ) | 1023 ) |
| 952 </div> | 1024 </div> |
| 953 | 1025 |
| 954 </em> | 1026 </em> |
| 955 </dt> | 1027 </dt> |
| 956 <dd class="todo" style="display: none; "> | 1028 <dd class="todo" style="display: none; "> |
| 957 Undocumented. | 1029 Undocumented. |
| 958 </dd> | 1030 </dd> |
| 959 <dd>The only content type using resource identifiers is <var>plugins</
var>. Using a resource identifier allows an extension to specify content setting
s applying only to a specific plug-in. If no rule for the specific plug-in is fo
und, the rules without resource identifiers are applied.</dd> | 1031 <dd>The only content type using resource identifiers is <a href="conte
ntSettings.html#property-plugins"><var>plugins</var></a>. For more information,
see <a href="contentSettings.html#resource-identifiers">Resource Identifiers.</a
></dd> |
| 960 <dd style="display: none; "> | 1032 <dd style="display: none; "> |
| 961 This parameter was added in version | 1033 This parameter was added in version |
| 962 <b><span></span></b>. | 1034 <b><span></span></b>. |
| 963 You must omit this parameter in earlier versions, | 1035 You must omit this parameter in earlier versions, |
| 964 and you may omit it in any version. If you require this | 1036 and you may omit it in any version. If you require this |
| 965 parameter, the manifest key | 1037 parameter, the manifest key |
| 966 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | 1038 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 967 can ensure that your extension won't be run in an earlier browser ve
rsion. | 1039 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 968 </dd> | 1040 </dd> |
| 969 | 1041 |
| (...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2358 </span> | 2430 </span> |
| 2359 </span> | 2431 </span> |
| 2360 ) | 2432 ) |
| 2361 </div> | 2433 </div> |
| 2362 | 2434 |
| 2363 </em> | 2435 </em> |
| 2364 </dt> | 2436 </dt> |
| 2365 <dd class="todo" style="display: none; "> | 2437 <dd class="todo" style="display: none; "> |
| 2366 Undocumented. | 2438 Undocumented. |
| 2367 </dd> | 2439 </dd> |
| 2368 <dd>The pattern for the primary URL. For details on the format of a pa
ttern, see <a href="match_patterns.html">Match Patterns</a>.</dd> | 2440 <dd>The pattern for the primary URL. For details on the format of a pa
ttern, see <a href="contentSettings.html#patterns">Content Setting Patterns</a>.
</dd> |
| 2369 <dd style="display: none; "> | 2441 <dd style="display: none; "> |
| 2370 This parameter was added in version | 2442 This parameter was added in version |
| 2371 <b><span></span></b>. | 2443 <b><span></span></b>. |
| 2372 You must omit this parameter in earlier versions, | 2444 You must omit this parameter in earlier versions, |
| 2373 and you may omit it in any version. If you require this | 2445 and you may omit it in any version. If you require this |
| 2374 parameter, the manifest key | 2446 parameter, the manifest key |
| 2375 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | 2447 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 2376 can ensure that your extension won't be run in an earlier browser ve
rsion. | 2448 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 2377 </dd> | 2449 </dd> |
| 2378 | 2450 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2426 </span> | 2498 </span> |
| 2427 </span> | 2499 </span> |
| 2428 ) | 2500 ) |
| 2429 </div> | 2501 </div> |
| 2430 | 2502 |
| 2431 </em> | 2503 </em> |
| 2432 </dt> | 2504 </dt> |
| 2433 <dd class="todo" style="display: none; "> | 2505 <dd class="todo" style="display: none; "> |
| 2434 Undocumented. | 2506 Undocumented. |
| 2435 </dd> | 2507 </dd> |
| 2436 <dd>The pattern for the secondary URL. Defaults to matching all URLs.
For details on the format of a pattern, see <a href="match_patterns.html">Match
Patterns</a>.</dd> | 2508 <dd>The pattern for the secondary URL. Defaults to matching all URLs.
For details on the format of a pattern, see <a href="contentSettings.html#patter
ns">Content Setting Patterns</a>.</dd> |
| 2437 <dd style="display: none; "> | 2509 <dd style="display: none; "> |
| 2438 This parameter was added in version | 2510 This parameter was added in version |
| 2439 <b><span></span></b>. | 2511 <b><span></span></b>. |
| 2440 You must omit this parameter in earlier versions, | 2512 You must omit this parameter in earlier versions, |
| 2441 and you may omit it in any version. If you require this | 2513 and you may omit it in any version. If you require this |
| 2442 parameter, the manifest key | 2514 parameter, the manifest key |
| 2443 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | 2515 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 2444 can ensure that your extension won't be run in an earlier browser ve
rsion. | 2516 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 2445 </dd> | 2517 </dd> |
| 2446 | 2518 |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2864 _uff=0; | 2936 _uff=0; |
| 2865 urchinTracker(); | 2937 urchinTracker(); |
| 2866 } | 2938 } |
| 2867 catch(e) {/* urchinTracker not available. */} | 2939 catch(e) {/* urchinTracker not available. */} |
| 2868 </script> | 2940 </script> |
| 2869 <!-- end analytics --> | 2941 <!-- end analytics --> |
| 2870 </div> | 2942 </div> |
| 2871 </div> <!-- /gc-footer --> | 2943 </div> <!-- /gc-footer --> |
| 2872 </div> <!-- /gc-container --> | 2944 </div> <!-- /gc-container --> |
| 2873 </body></html> | 2945 </body></html> |
| OLD | NEW |