title: Chrome extension that runs code when ajax requests happen
body: <p>So, to give a basic description of my issue.</p>
  
  <p>I have a extension that is working right now (finally) that wraps phonenumbers in an  type of tag. </p>
  
  <p>It is working right now, but I am having an issue with anything that is dynamically loaded via JS based on user action, or based on ajax requests</p>
  
  <p>For example, if I click a hotmail email, and open it, the script works, but only when I refresh the page so that the email loads and calls my contentscript. </p>
  
  <p>I thought about getting around this by making the user click the icon for the extension, but that is not really the functionality that was requested. </p>
  
  <p>If there is a way in Chrome to listen to ajax requests (which there seems to be) <a href="http://code.google.com/chrome/extensions/webRequest.html" rel="noreferrer">http://code.google.com/chrome/extensions/webRequest.html</a>
  That is what I want to do, but I am not sure how to implement this. Do I treat it as a listener? </p>
  
  <p>I figured out another way to do this based on when the DOM changes, but that made loads take a long time, there is just too much going on in the DOM to do it that way. I need to listen for AJAX requests and run my code again when they finish.</p>
  
  <p>Anyhelp or even a pointer in the right direction would be great =) </p>
  
  <p>Please be nice if this is a dumb question, I promise I have been Google'ing and searching forms for an answer and I can't seem to find anything. It is possible that I don't know enough to even ask the right question. I have been using javascript for about two weeks now... so my learning curve has been rough climb. </p>