title: Chrome Extension changeInfo.status
body: <p>I just tried to add a tab listener to a chrome extension I've been fooling around with but I have run into sort of an infinite loop problem.</p>
  
  <p>Here is the code that I tried</p>
  
  <pre><code>chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) 
  {
      if(changeInfo.status === "loading")
      {
          chrome.tabs.update(tabId, {'url': 'main.html'});
      }
  
  });
  </code></pre>
  
  <p>What happens is as soon as the tab starts loading it sends the url too the main.html. Only problem is it triggers the onUpdated and continues to send the page to main.html</p>
  
  <p>Is there a way around this. The only thing I can think is test if the url contains main.html but that feels a little hacky.</p>
  
  <p>Any thoughts?</p>