title: Call a function after loading an URL
body: <p>I want to execute a certain function after an specified URL loads.
  I tried to set an interval to detect the url I want, but it isn't working so far.
  here's the code I have for calling the function:</p>
  <pre><code>pub.startup = function() {
  var currURL = window.top.getBrowser().selectedBrowser.contentWindow.location.host;
  window.setInterval(currURL, 1000);
  if (currURL == 'www.google.com')
  FunctionToCall();
  }
  </code></pre>
  <p>Hope to get some help.</p>