title: Change URL on onBeforeRequest
body: <p>I have following code:</p>
  
  <pre><code>chrome.webRequest.onBeforeRequest.addListener(
    function(details) {         
  
      return { redirectUrl: "http://yahoo.com"};
    },
    {
      urls: [
        'http://google.com'
      ],
      types: ['main_frame']
    },
    ['blocking']);
  </code></pre>
  
  <p>This is redirecting google.com to yahoo.com.
  My Question is now howto keep <code>google.com</code> in the addressbar, showing yahoo.com.</p>
  
  <p>My first attempt was to use</p>
  
  <p><code>chrome.tabs.update(tab.id, {url: details.url});</code></p>
  
  <p>but that results in an Reloading of the site.</p>
  
  <hr>
  
  <p><strong>WHY?</strong></p>
  
  <p>I am requesting this for <a href="https://chrome.google.com/webstore/detail/pdf-viewer/pdbekdpgndlhjmiobbgcnoagbghfdkfa" rel="nofollow">pdf.js</a>, since its anoying to loose the PDF URL.</p>