title: Chrome extension webRequest.onBeforeRequest
body: <p>I am trying to create an extension to analyse requests made on the chrome browser but I can't put it work. The alert never fires.</p>
  
  <p>manifest.json</p>
  
  <pre><code>{
    "name": "Test",
    "description": "Test",
    "version": "1.0",
    "manifest_version": 2,
    "permissions": ["background", "tabs", "webRequest", "webRequestBlocking", "*://*/*"],    
    "background": {
      "scripts": ["background.js"],
      "persistent": true
    }  
  }
  </code></pre>
  
  <p>background.js</p>
  
  <pre><code>var callback = function(details) {
      alert("hello");
  };
  var filter = { "*://*/*" };
  var opt_extraInfoSpec = [];
  
  chrome.webRequest.onBeforeRequest.addListener(
          callback, filter, opt_extraInfoSpec);
  </code></pre>
  
  <p>Why is it my alert not firing?</p>