| 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> |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 }, | 507 }, |
| 508 bypassList: ["foobar.com"] | 508 bypassList: ["foobar.com"] |
| 509 } | 509 } |
| 510 }; | 510 }; |
| 511 chrome.proxy.settings.set( | 511 chrome.proxy.settings.set( |
| 512 {value: config, scope: 'regular'}, | 512 {value: config, scope: 'regular'}, |
| 513 function() {}); | 513 function() {}); |
| 514 </pre> | 514 </pre> |
| 515 | 515 |
| 516 <p> | 516 <p> |
| 517 The following code sets a custom PAC script. | 517 The following code sets a custom pac script. |
| 518 </p> | 518 </p> |
| 519 | 519 |
| 520 <pre>var config = { | 520 <pre>var config = { |
| 521 mode: "pac_script", | 521 mode: "pac_script", |
| 522 pacScript: { | 522 pacScript: { |
| 523 data: "function FindProxyForURL(url, host) {\n" + | 523 data: "function FindProxyForURL(url, host) {\n" + |
| 524 " if (host == 'foobar.com')\n" + | 524 " if (host == 'foobar.com')\n" + |
| 525 " return 'PROXY blackhole:80';\n" + | 525 " return 'PROXY blackhole:80';\n" + |
| 526 " return 'DIRECT';\n" + | 526 " return 'DIRECT';\n" + |
| 527 "}" | 527 "}" |
| 528 } | 528 } |
| 529 }; | 529 }; |
| 530 chrome.proxy.settings.set( | 530 chrome.proxy.settings.set( |
| 531 {value: config, scope: 'regular'}, | 531 {value: config, scope: 'regular'}, |
| 532 function() {}); | 532 function() {}); |
| 533 </pre> | 533 </pre> |
| 534 | 534 |
| 535 <p> | 535 <p> |
| 536 The next snippet queries the currently effective proxy settings. The effective | 536 The next snippet queries the currently effective proxy settings. The effective |
| 537 proxy settings can be determined by another extension or by a policy. See the <a
href="preferences.html">Preferences API</a> documentation for details. | 537 proxy settings can be determined by another extension or by a policy, see the <a
href="preferences.html">Preferences API</a> documentation. |
| 538 </p> | 538 </p> |
| 539 | 539 |
| 540 <pre>chrome.proxy.settings.getEffective( | 540 <pre>chrome.proxy.settings.getEffective( |
| 541 {'incognito': false}, | 541 {'incognito': false}, |
| 542 function(config) {console.log(JSON.stringify(config));}); | 542 function(config) {console.log(JSON.stringify(config));}); |
| 543 </pre> | 543 </pre> |
| 544 | 544 |
| 545 <p> | 545 <p> |
| 546 Note that the <code>value</code> object passed to <code>set()</code> is not | 546 Note that the <code>value</code> object passed to <code>set()</code> is not |
| 547 identical to the <code>value</code> object passed to callback function of | 547 identical to the <code>value</code> object passed to callback function of |
| (...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2389 _uff=0; | 2389 _uff=0; |
| 2390 urchinTracker(); | 2390 urchinTracker(); |
| 2391 } | 2391 } |
| 2392 catch(e) {/* urchinTracker not available. */} | 2392 catch(e) {/* urchinTracker not available. */} |
| 2393 </script> | 2393 </script> |
| 2394 <!-- end analytics --> | 2394 <!-- end analytics --> |
| 2395 </div> | 2395 </div> |
| 2396 </div> <!-- /gc-footer --> | 2396 </div> <!-- /gc-footer --> |
| 2397 </div> <!-- /gc-container --> | 2397 </div> <!-- /gc-container --> |
| 2398 </body></html> | 2398 </body></html> |
| OLD | NEW |