Gmail - Insert HTML Signature

By mjb Last update Sep 4, 2007 — Installed 27,112 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 48 posts, 32 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Cathryne User

Here's one that seems to be working:
http://userscripts.org/scripts/show/20887

 
Mark Claudiu... User

It stopped working on the 25th.

 
mjb Script's Author

As promised, here's the early version of a script that works with the new version of GMail. Read the summary carefully and let me know if you have any questions.

 
mjb Script's Author

Thank you all for your patience with my limited time to work on this. I plan on making a new version that works with the new version of GMail and uses the GMail/Greasemonkey API. Coming soon...

 
A. Sagarwala User

No love. It doesn't work for me. Anyone know of another script that currently works?

 
yuping User

Please.
new gmail version.
thanks for your work.

 
l3utterfish User

is it working in the NEW GMAIL?
for me is not..-

 
Mike Cowles User

Gmail Signature Float adds all of the features this script is trying to without the button, as well as bringing it to the top and removing the dashes.

You simply enter the html in Gmail's signature section and you're done.

If you're having challenges with this script, try Gmail Signature Float to add these options.

 
Charlie Redell User

This is great except when I try to add a signature with any kind of line breaks using the br or p tags, it breaks the script entirely. I lose the link to insert a signature and obviously then have no signature.
Is there a way to fix this?
thanks,
Charlie

 
sjb User

I second gabedibble's request.

When using Gmail Super Clean, the Insert Signature link is indented against the Compose Mail link, which looks wonky.

It would be tight if we could have this link removed altogether in favor of an automatic insertion. Or, give the option to have it automatic or manual by a flagged variable in the script.

 
info@kwphoto... User

I can't get this to work at all....I have a working understanding of html...but whenever I add mine to the signature areas nothing works!

help!

 
gabedibble Scriptwright

This would be a cool option:

1) add a variable to Auto Insert
--if you have one HTML signature, it inserts that one every time
--if you have more than one, the script should ask you which one (just as if you were to click the link)

--------

Also, while in my INBOX there is an Add Signature link. It doesn't work until I Compose a new message. Can you please try to remove that link from the inbox, thus only showing it when Composing? Thanx!

 
mjb Script's Author

Okay, I decided that for now, the link will go back to being underneath the Compose link. I know it's not optimal, location-wise, but makes sense on the backend. I'll work, as I have time, to figure out a way to put it in the rich text menu bar...

Also, I updated the insert function to be a bit more efficient.

Thanks!

 
mjb Script's Author

Oh, and I wanted to thank teljj001 for his update. I've used and it works well.

Thanks!

 
mjb Script's Author

UPDATE
1 - I've added the functionality to name your separate signatures.

2 - I've changed the placement so that it shows up at the bottom of the compose screen in both Compose and Reply/Forward windows.

Known issues: If you reply to a message in the middle of the thread, you have to scroll down to the bottom of the screen to find the button. I'm working on it.

Thanks!!
Mark

 
Peter Sward User

Update.
Inserting the sig works if I'm the first one to reply. Inserting the sig when replying to a thread with a previous reply doesn't work.

 
Peter Sward User

Doesn't work on forward or reply. Firefox 2.0.0.6. Reinstalled the original script and same result. It does work on compose.

 
Nathan Sudds User

I agree 100% -- thanks for the work on this script, the new changes are great!

The suggestion to somehow add this feature to the composition area would be brilliant too - I often have to scroll WAYYY up to insert the sig... of course I guess if I get in the habit I could click insert before I scroll to the composition window on replies :)

I'd love to know if it was possible, or even floating would be brilliant too so it scrolls with the movement of the browser.

I've seen other scripts that do both, but neither are as great with the other features. Seriously --- great work on making this available, it saves a ton of time, especially now that the reply/forward works consistently!

I'm also using this with Google Apps for my Domain if anyone is curious, it works great with my custom setup.

Thanks Mark!

Nathan

 
Peter Sward User

Chris,
I just changed this line in the script
"var which = prompt("Which signature would you like? 1=PCPro 2=BOT 3=NW 4=Princess");" and that will help me remember what's what. Of course if you have 20 sigs, this isn't so good

 
Peter Sward User

Shouldn't the sig be after my text when I do a reply? I'm a bit confused why it's at the top of the page? Otherwise I like it a lot.

 
Chris Bartlett User

This script is terrific!

One question... Would it be possible to change the code so that instead of selecting "1-3", you could set short names for a saved sig?

Basically, if I want to create, say 20 different signatures, it would be hard to remember what's what, but if the 1-3 selection was instead a list of short names, that would be great.

I am very limited with JS and don't think I could do this myself unless it were pretty simple.

 
Piyush Jain User

I have only one html sig. What should i change to always add the sig without having to click on 'Add HTML Sig'

thx..

 
sjb User

Teljj001,

Could you please post exactly where your edits need to go within the script?

Thanks,

/s

 
teljj001 User
I needed to make a couple of changes to get this to work: if (sigNode) { sigNode.parentNode.insertBefore(sep, sigNode.nextSibling); sigNode.parentNode.insertBefore(navSigLink, sigNode.nextSibling); } (wrapped if statement to avoid sigNode errors) function insertSignature(s_html) { var txtBox = getNode('hc_compose'); if (txtBox) { // no reply/forward text, insert at end txtBox.contentDocument.body.innerHTML = txtBox.contentDocument.body.innerHTML + '

' + s_html; } else { // reply/forward for (var nodeId = 0; nodeId < 30 && !txtBox; nodeId++) { txtBox = getNode('hc_' + String(nodeId)); } if (txtBox) { // reply/forward, insert at the beginning txtBox.contentDocument.body.innerHTML = '

' + s_html + '

' + txtBox.contentDocument.body.innerHTML; } } }
(updated function to handle threads without causing an error, and support threads greater than 2 messages long.) Hope this helps, JT
Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel