title: chrome.tabs.onUpdated.addListener firing more than once
body: <p>I am making a chrome extension, and in my background scripts I have an <code>addListener</code>, but it is firing more than once even though it is an <code>onUpdated.addListener</code>. I added an if statement to check for when <code>changeInfo.status == 'complete'</code>, but it is STILL firing multiple times. I know Google Chrome had a bug that had to do with this, but that was years ago. Any solutions? Thanks in advance.</p>
  
  <p>Here is my background.js:</p>
  
  <pre><code>// Get the behavior of the plugin; the default is set to "onClick", the other option is "alwaysOn"
  chrome.storage.sync.get({
  extensionBehavior: 'onClick'
  }, function(items) {
      if(items.extensionBehavior == 'onClick'){
          chrome.browserAction.onClicked.addListener(function() {
              // When the extension icon is clicked, send a message to the content script
              chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
                  chrome.tabs.sendMessage(tabs[0].id, {"message": tabs[0].url}, function(response){});
              });
          });
      }
      else {
          chrome.browserAction.setBadgeText({text:"auto"});
          chrome.tabs.onCreated.addListener(function (tab) {
              chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {
                  if (tab.status == 'complete') {
                      chrome.tabs.sendMessage(tabId, {"message": tab.url}, function(response){});
                  }
              });
          });
      }
  });
  </code></pre>
  
  <p>Here is my manifest.json:</p>
  
  <pre><code>{
  "manifest_version": 2,
  "name": "My Extension",
  "version": "1.2.1",
  "description": *redacted for privacy reasons*,
  "content_scripts": [{
      "matches": [
        "&lt;all_urls&gt;"
      ],
      "js": ["content_script.js", "jquery-2.2.4.js"]
    }
  ],
  "background": {
      "scripts": ["background.js"]
  },
  "options_ui": {
      "page": "options.html"
  },
  "browser_action": {
      "default_icon": "blue-logo.png"
  },
  "permissions": [
      "storage",
      "activeTab",
      "tabs"
  ]
  }
  </code></pre>
  
  <p>If you're wondering why I have an <code>onUpdated</code> inside of my <code>onCreated</code>, it's because the onCreated wasn't working alone, and I also need it to fire when tabs that have previously been created are also updated (as in, I create a tab, go to a URL, and then go to another URL with that tab). I was checking for <code>changeInfo.status</code> at first, but when that wasn't working I changed it to <code>tab.status</code>, are these not the same variable? Both seem to give the same behavior (firing when they aren't supposed to).</p>