I'm having fun writing greasemonkeyuser scripts! For the uninitiated, greasemonkey is a Firefox extension that lets one modify a web page with javascript in powerful ways. This means that to install the user script, you must first install the greasemonkey extension, and then the script into it. The script recieves new features first, and sometimes only, and there are a lot of other fantastic user scripts to do amazing things like this, so I suggest you use greasemonkey!

Install:

Warning: this is of course not official gmail code. I offer no warranty express or implied on this script. Use it at your own risk.

Changes in latest update:

Keyboard shortcut, by popular demand. (FIXED in 3.4.3)

Check the comments in the source code of the user script for past update history.

Compatibility: The newest version of the extension is compatible with Firefox 1.5. The newest user script is also, as long as you use version 0.6.4 of Greasemonkey. It may be found for download at the Greasemonkey blog.

Screenshot

Comments:

Comment Archive2005-10-05 10:16 - arantius

I have just released version 3.0 of Gmail Delete Button. All old comments remain in the archive.

In the future: Please do not use the comment form on this page as a discussion forum, or a way to contact me. If you have a problem or suggestion with the script, please use my contact form to send me a message. If you have a comment that you feel the public should see, though, by all means post it here!

As a reminder, though: Yes, version 3.0 is not compatible with beta versions of Firefox. Please do not request that this changes. If you are running a beta version of Firefox, install an old version as linked above. This script will be updated to be compatible when the new version of Firefox is available.

gmail DELETE button2005-10-11 15:33 - jdwaters

THANK YOU a million times over.
I just can't believe the geeks a Google won't add a stupid Delete button. Even better, let me customize my own little toolbar.

To me, a simple Delete button is standard equipment. Glad to see I'm not the only one in the world that thinks this way.

localization2005-10-12 14:29 - vanbregt

Would there be localization in the future? I use Gmail in Dutch and "Delete" should say "Verwijder". If it won't it's no problem at all.... It still works great.

Delete button is ot created with sessionSaver2005-10-14 04:42 - Crirus

If the tab window is saved, on reload of FF, delete button is not created, only on refresh will appear

Cristian

Move button to the right?2005-10-18 11:22 - bkuri

Hello,

Is there a way to move the "delete" button to the right of the "archive" button? I'm already used to having that button there, and I've already deleted more than a couple of messages by accident...

Keep up the great work, though!

Preferences!2005-10-18 11:47 - arantius

As the notes at the top of the page you can see that new in version 3.1 is configurability of the button. You may choose the text color, and the position! This is for the user script only at this point, but with the user script installed and gmail open, click tools, user script commands, gmail delete button position. You'll want to put in 'right'.

Firefox 1.5RC1 & GreaseMonkey 0.6.22005-11-02 01:25 - StormeRider

Work fine with 3.3. :)

Yay!2005-11-14 15:36 - tanyaiscrazy

Works like a charm! Thank you so much for coming up with this! It's awesome!

Keyboard Shortcuts2005-11-25 13:44 - arantius

My apologies to the users who had problems with the keyboard shortcuts. I had attempted to hook into Gmail's own keyboard shortcut functionality for the best compatibility and functionality. (I envisioned the shortcut turning off when you set Gmail's own shortcuts off by virtue of this.)

Well, I did hook in to their system, but in the wrong place, and some users saw the shortcut triggering as messages were composed. I have re-implemented the keyboard shortcut in a simpler manner, and it is more stable, in version 3.4.3.

Extend to "Trash this message"?2005-11-26 06:37 - George V. Reilly

This fills a much-needed void (heh).

This button is great for deleting an entire conversation. However, if I want to delete a message in the middle of a threaded conversation, I have to click "More options", then move the mouse to click "Trash this message". Can you extend this?

Error when composing.2005-12-10 16:09 - ielliott

I have shortucts turned off in GMail. When I go to Compose Mail, and start typing, whenever I type the leter 'd' - it pops up an error:

BUG! Could find button. Please alert the author.

Yes, it says "Could" not "Couldn't".

Any thoughts?

RE: Error when composing.2005-12-10 16:18 - ielliott

Sorry about that guys.

I realized I can fix the problem by going to Tools > User Script Commands > GMail Delete Button HotKey and deleting the "d" out of there.

fantastic!2005-12-13 13:57 - lee

nice one. thanks.

No delete button on Firefox 1.52005-12-20 07:36 - Never

Since I upgraded to Firefox 1.5 I don't have the handy delete button anymore. I guess it can be some incompatibility with other FF extensions, but I cannot figure it out. Do you have any clue? Thanks for the neat work!

No delete button on Firefox 1.52005-12-20 18:39 - ServiceCompupters

Please insure that you have the latest version of greasemonkey & of Gmail Delete Button. Older versions are not compatible with Firefox 1.5. To upgrade, select Tools | Extensions from the menu & click on each extension & click the upgrade button.

An additional option idea2005-12-31 10:47 - citizenkahn

The feature is great. Yahoo mail has a delete button which has the behavior of going to the next message after being hit when in a message. Do you think that would be a reasonable feature for this?

partial solution?2006-01-10 15:19 - eric

Please let me know if I am correct on this:

From what I understand of gmail's technology infrastructure this is only a partial solution.

When mail comes into gmail it is stored in a centralized database; a link to that message is put in your inbox. this way if 100 people on gmail get the same exact email it is only stored once, but 100 pointers to the message exist in people's email boxes.

This tool might allow you to "delete" it from your inbox but from what I can see (I could be wrong) it only removes the pointer from your inbox to the actual stored message. The message itself is never deleted. right?

I noticed that the delete button stopped working today... then I noticed that there were 2 delete buttons. Looks like gmail now has a delete button. Yippie!

Thanks for the work Anthony!

Did we win?2006-01-17 16:19 - arantius

I was about to exclaim, "We won!" In a gush of usability triumph. But I don't see it. When I fire up IE (No greasemonkey script to fool me there!) I don't see a delete button in my primary or secondary for-testing account.

Do you perhaps have the extension installed as well as the user script? Maybe another version of the script?

I'm interested in hearing if anyone else does get a delete button without any script/extension providing it.

hmmmm....2006-01-18 09:21 - nhlinux

The only other gmail related extension that I have is 'Gmail Manager (0.4.2)'. I do not have the GreaseMonkey extension, so that does not appear to be it. I decided to fire up IE, and sure enough, I have a Delete button in IE (to the left of the pull down menu) too!

Maybe I am just 'special' ;-)

Yay!2006-01-18 18:21 - Leo

I just noticed I couldn't use it anymore, and then saw the second button (and the lack of "delete" option in the drop-down menu).
Needless to say, I came here right away to thank you for having made this an extension. It really saved many seconds of my life!
Thanks a lot! Hope you make some other button, maybe Gmail will add it too ;) (a "mark as read" button! lol, half-joking)
Cheers!

G Mail Delete button2006-01-19 16:33 - rleonetti

Since Google added theirs, I now have two buttons, one of which does not work. How do I undo the script originally added?

Uninstall?2006-01-19 17:06 - arantius

If you installed the extension, uninstall it the same way you uninstall any extension.

If you installed the user script in greasemonkey, the same way you uninstall any greasemonkey script. (Tools, Manage User Scripts, select it, Uninstall).

New button2006-01-19 21:36 - epsilon

Just wanted to thanks for the wonderful extension you made, that gave us the delete functionality while google didn't have it yet. Noticed it today when I tried to click the delete, and nothing happened.

Thanks again for your past work! :)

So...thank you!2006-01-20 07:32 - Michal

I haven't noticed the new Delete button by Google until I tried to use the old one (and it didn't work anymore). So now that Google added the button, I uninstalled the extension from Firefox, as it's not necessary anymore.

P.S.: I liked your Delete button better. Thank you for your work.

Google has added a Delete button2006-01-20 13:48 - anyhja

Check out it out! Google has added a delete button to their gmail service.

New Gmail delete with no keyboard shortcut2006-01-20 16:42 - byteshack

The new addition by Google does not include a keyboard shortcut to delete. I would find that extremely useful! Let us know if you decide that it is worth you time :)

I also love the keyboard shortcut from your Gmail Delete.
I can't believe Google's Delete button doesn't have that shortcut.
Do let us know if you gonna add the delete shortcut. If not, I might get my hands dirty.

Hi, your script is very useful, please keep maintain the project. Because google did not added a shortcut for delete. I modified the script for aviod display two delete button, and fixed shortcut when the interafce have a delete button already.

Use angle braces around a plain URL to auto-link it: <http://www.example.com/>.

Use this format to create a link with different text showing: [An Example](http://www.example.com/).

Use backticks (``), not leading spaces to enclose a code block.

If you are attempting to contact me, ask me a question, etc,
please send me a message through the
contact form rather
than posting a comment here. Thank you.
(If you post a comment anyway when it should be a message
to me, I'll probably just delete your comment. I don't like
clutter.)