JavaScript has always haunted me as a language. I know HTML and CSS but JS always ruins me!
I'm trying to write a very simple, very basic script just to see if I can get the hang of it. I'm trying to tweak the appearance of my Gmail address inside my inbox.
Instead having my address being displayed as
firstlast@gmail.com, I would rather have it as
first.last@gmail.com. Here's is my code:
Code:
(function () {
var newEmail = "first.last@gmail.com";
var nameTag = document.getElementsByTagName('span').getElementById('gbi4t')[0];
nameTag.setAttribute(innerHTML, newEmail);
}) ();
I just can't seem to get it to work. What am I doing wrong?