title: xpath greasemonkey
body: <p>I am trying to modify gmail in a greasemonkey script. Using xpather i can get the xpath expression for the part i am trying to hide. But using following snippet i can not get a match. alert function is never called. Can anyone point me to what am i doing wrong?</p>
  
  <pre><code>var allLinks, thisLink;
  allLinks = document.evaluate(
       "//html/body/div[1]/div/div/div[1]/div/div[3]/div[1]/div[2]/div[2]/div[1]/div[1]",
       document,
       null,
       XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
       null);
  for (var i = 0; i &lt; allLinks.snapshotLength; i++) {
    thisLink = allLinks.snapshotItem(i);
    alert("found");
  }
  </code></pre>
  
  <p>@Alan Storm</p>
  
  <p>I installed firebug tested the script using console it works but still i can not get it to work under greasemonkey. Greasemonkey still not giving me an alert box. I also tried adding a on load event listener that did not helped either.</p>