Next:getElementsByTagName() returns an array of pointers, accessible numerically through an array reference [#] tacked on at the end like this: getElementsByTagName()[0].

getElementById() returns a single pointer (which is one reason why an ID name should only be used once on a page - your script won't know which one you mean).

So far, it appears your script is backwards and should probably be:var nameTag = document.getElementById('gbi4t').getElementsByTagName('span')[0];

Since I can't imagine gMail using improper coding, if the span containing the email address you want to change has the id gbi4t this is probably all you need.var nameTag = document.getElementById('gbi4t');

If it is the first span inside of a container that has the id gbi4t its as I pointed out above:var nameTag = document.getElementById('gbi4t').getElementsByTagName('span')[0];

I'm just guessing here since I don't know exactly what you are trying to reference.