View Single Post
Old 09-01-2011, 10:45 PM   PM User | #1
DaveyJake
New to the CF scene

 
Join Date: Oct 2010
Location: Orange County, CA
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
DaveyJake is an unknown quantity at this point
Beginner Question on Modifying Text w/ Greasemonkey

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?
DaveyJake is offline   Reply With Quote