title: chrome webrequest api array of urls?
body: <p>Here is the code for a very simple chrome extension that blocks manually specified websites.  </p>
  
  <pre><code>chrome.webRequest.onBeforeRequest.addListener(function(details) { 
      return {cancel: true}; 
  },
  {urls: ["*://*.google.com/*", "*://*.facebook.com/*"]},
  ["blocking"]);
  </code></pre>
  
  <p>I'm wondering if it's possible to make this url list equal to an array of websites, and if so what the syntax is. My goal is to retrieve a list of websites from a websocket server, then have my chrome extension block them. Here is my code. </p>
  
  <pre><code>var testSocket = new WebSocket("http://www.example.com/socketserver");
  testSocket.onmessage = function (e) {
       var websites = e.split(',');
       console.log(e);
  }
  </code></pre>
  
  <p>I'm new to javascript, but I believe this should allow me to connect to an "example.com" websocket server, retrieve a string of urls separated by commas, and split the string into an array named "websites."</p>
  
  <p>Assuming the above code does what I just described (and please tell me if it does not), how do I set "urls" from the chrome extension equal to "websites"?</p>