Reputation: 59
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.
Upvotes: 0
Views: 182
Reputation: 523334
return Array.prototype.filter.call(
document.getElementById("canvas_frame").contentDocument.getElementsByTagName("a"),
function(x){return /#inbox$/.test(x.href);}
)[0];
Upvotes: 1