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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 }, | 586 }, |
587 {}, | 587 {}, |
588 ["blocking"]); | 588 ["blocking"]); |
589 </pre> | 589 </pre> |
590 | 590 |
591 <p>The following example achives the same goal in a more efficient way because | 591 <p>The following example achives the same goal in a more efficient way because |
592 requests that are not targeted to <code>www.evil.com</code> do not need to be | 592 requests that are not targeted to <code>www.evil.com</code> do not need to be |
593 passed to the extension:</p> | 593 passed to the extension:</p> |
594 <pre>chrome.experimental.webRequest.onBeforeRequest.addListener( | 594 <pre>chrome.experimental.webRequest.onBeforeRequest.addListener( |
595 function(details) { return {cancel: true}; }, | 595 function(details) { return {cancel: true}; }, |
596 {"*://www.evil.com/*"}, | 596 {urls: ["*://www.evil.com/*"]}, |
597 ["blocking"]); | 597 ["blocking"]); |
598 </pre> | 598 </pre> |
599 | 599 |
600 <p>The following example illustrates how the User-Agent header can be deleted | 600 <p>The following example illustrates how the User-Agent header can be deleted |
601 from all requests:</p> | 601 from all requests:</p> |
602 <pre>chrome.experimental.webRequest.onBeforeSendHeaders.addListener( | 602 <pre>chrome.experimental.webRequest.onBeforeSendHeaders.addListener( |
603 function(details) { | 603 function(details) { |
604 delete details.requestHeaders['User-Agent']; | 604 delete details.requestHeaders['User-Agent']; |
605 return {requestHeaders: details.requestHeaders}; | 605 return {requestHeaders: details.requestHeaders}; |
606 }, | 606 }, |
(...skipping 6941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7548 _uff=0; | 7548 _uff=0; |
7549 urchinTracker(); | 7549 urchinTracker(); |
7550 } | 7550 } |
7551 catch(e) {/* urchinTracker not available. */} | 7551 catch(e) {/* urchinTracker not available. */} |
7552 </script> | 7552 </script> |
7553 <!-- end analytics --> | 7553 <!-- end analytics --> |
7554 </div> | 7554 </div> |
7555 </div> <!-- /gc-footer --> | 7555 </div> <!-- /gc-footer --> |
7556 </div> <!-- /gc-container --> | 7556 </div> <!-- /gc-container --> |
7557 </body></html> | 7557 </body></html> |
OLD | NEW |