title: How to match a URL from a tab with an Array of URL's - Google Chrome Extension
body: <p>So far I have this:</p>
  
  <pre><code>// So we can notify users
      var notification = webkitNotifications.createNotification(
      'icon-48.png',  
      'Alert!', 
      'abcdefghijklmnop'
  );
        // Called when the url of a tab changes.
        function checkForValidUrl(tabId, changeInfo, tab) {
          // Compare with a the URL
          if (tab.url.indexOf('example.com') &gt; -1) {
            //then
            chrome.pageAction.show(tabId);
            notification.show();
          }
        };
  
        // Listen for any changes to the URL of any tab.
        chrome.tabs.onUpdated.addListener(checkForValidUrl);
  </code></pre>
  
  <p>Instead of simply comparing with example.com as above I would like to check the URL against an Array of URL's. How would I do this?</p>