title: How to get the user entered URL of a Chrome new Tab when it re-derected
body: <p>In my chrome extension, I wanted to get the user given URL of the new chrome tab.
  The targeted page is a SAML based authentication page, which redirects and end up at idp page.</p>
  
  <p>I started with simple approaches like:
  <code>document.referrer</code> which has given last referer, but not the initial url , which user entered in the URL bar.</p>
  
  <p><strong>2nd Approach:</strong></p>
  
  <pre><code>chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
   console.log(changeInfo.url);
  });
  </code></pre>
  
  <p>But for any <code>TabStatus</code> it doen't return the exact url which I expected.</p>
  
  <p><strong>Example:</strong></p>
  
  <ul>
  <li>put this above code to a background script or enter it on the background console.</li>
  <li>open a new incognito window/tab and enter <a href="https://mail.google.com/mail/u/0/#inbox" rel="nofollow noreferrer">https://mail.google.com/mail/u/0/#inbox</a></li>
  </ul>
  
  <p><strong>console output:</strong></p>
  
  <pre><code>chrome://newtab/
  https://www.google.com/intl/si/gmail/about/#
  </code></pre>
  
  <p>2nd url is the landed page's URL but not the url I entered.</p>
  
  <p>My next plan is to try <code>chrome.webRequest.onBeforeRequest</code> which seems complex, but before that, I wanted to know whether is there any easy way to get this?</p>