views:

27

answers:

1

Hello,

I want to get a reference to the Gmail Inbox button in Javascript? I tried my code in Firebug console but could not manage to find the right DOM node.

A: 
return Array.prototype.filter.call(
  document.getElementById("canvas_frame").contentDocument.getElementsByTagName("a"),
  function(x){return /#inbox$/.test(x.href);}
)[0];
KennyTM
Thank you very much
Valentina