/* Dynamic Comments... */

Saturday, July 23, 2005

Gmail Smart-Delete Button Ver. 0.4.0 Released!

Gmail has changed how they identify some mail items which, in certain instances, leaves the Smart-Delete button disabled.

[Show Full Post][Show Summary Only...]
The specific sequence referred to is:
1. View a mail item.
2. Delete it (which returns you to the inbox).
3. View the next item and the button remains disabled.

For some reason, Gmail identifies this mail item differently than others. This release addresses this issue. Please try it out & let me know what you think.

Thanks to Marty for identifying this one!

(Click to view larger.)

Download version 0.4.0 here: Gmail Smart-Delete Button
[To install, right-click the above link & choose 'Install User Script...' from context menu.]

Keep those comments and suggestions coming!
I'll try to implement any useful (and reasonable) suggestions you come up with.
Check back often for updates!

Related Tags:
/ / / / /

[Show Summary Only...]


Anonymous Marty said...

I just tried it out and still have the same problem. After deleting an email, if you select the next newer email, the Delete button is disabled.

It works fine if you select an email other than the next newer one in sequence.


10:33 AM, July 24, 2005  
Anonymous Marty said...

I have observed some other similar behavoir. The delete button is also disabled if you select "Newer" when viewing an email and the "Newer" one had not previously been marked "Read".

So it is anytime you go to the next newer email and that email has not been read. It doesn't matter if the first one is deleted or not and it doesn't matter if you do it by clicking "Newer" or through the message list.

I should have mentioned before that I appreciate the work on this. Lack of a Delete button in Gmail is by far my biggest gripe. It seems so obvious that there will be emails you want to delete.

Thanks again,


10:53 AM, July 24, 2005  
Blogger Andrew said...

Just to muddy the waters - I haven't experienced any problems with the current version. I have installed it on a number of different systems with different requirements and it all works fine. So, is this perhaps a hardware/software combination issue?

6:33 PM, July 24, 2005  
Anonymous Marty said...

Since Andrew isn't having any problems, I tried disabling all other GM user scripts and all extension except GM. It did not change the behavior.

As an aside, the Gmail Delete Button script has the same problem. In that case the button disapears completly. I have not contacted the author of that one.

I guess if I am the only one having the problem, Paul shouldn't spend too much time with it. But we all should vote for that improvement on the Gmail page for suggesting features


8:21 PM, July 24, 2005  
Blogger Paul M. said...

I am unable to duplicate the problem with ver 0.4.0. If you give me the details of what versions of OS, Greasemonkey, FF and any other relevant info, perhaps we can isolate a potential cause.
I develop on WinXP SP2, FF 1.04 & GM 0.3.3.

10:08 PM, July 24, 2005  
Anonymous Marty said...


Here is my software configuration.

Win XP Home SP2, Firefox 1.0.6.

Extensions: BGSOUND to EMBED 1.0.0, ChromEdit, Cookie Button 0.4, cuneAform 0.3.1, DictionarySearch 0.9.2, Enhanced History Manager, ForcastFox 0.8.1, Greasemonkey 0.3.5, ieview 1.2.4, Mimetype Editor 0.2, Mnenhy 0.7.2, MR Tech Local Install 2.5.0, Popup ALT Attribute 1.3.2005042001, Sage 1.3.1, SpellBound 0.7.3, SpellBound Win32 Components 0.8.0, ChromEdit, U.S. Homeland Security Threat Level 0.4, User Agent Switcher 0.6.6, xMirror 0.2.

Key Plugins: QuickTime Plug-in 6.5.1, Adobe Acrobat (7.01), Mozilla ActiveX control and plugin support, Adobe ESD Manager Plugin, Shockwave Flash, Shockwave for Director, Windows Media Player Plug-in Dynamic Link Library, Microsoft® DRM, Nullsoft Winamp Plug-in for Gecko, Microsoft Office 2003, Zoomify Plugin, RealJukebox NS Plugin, RealPlayer(tm) G2 iveConnect-Enabled
Plug-In (32-bit),RealPlayer Version Plugin, Java(TM) 2 Platform Standard Edition 5.0 Update 4.

Like I said, I don't want this to take up too much of your time if I am the only one with a problem.



5:02 AM, July 25, 2005  
Blogger Paul M. said...

Don't worry about the time, I know how frustrating it can be when something doesn't behave right.

The first thing that comes to mind, after viewing your info, is the fact that you are using the new 'neutered' version of greasemonkey. I'm not sure exactly what changes were made in the name of security, but I know it was thrown together pretty quickly.
I would suggest re-installing ver 0.3.3, if only to isolate this issue. If its a problem with 0.3.5, you have the choice of braving 0.3.3's security shortcomings, or live with this behavior under 0.3.5 until the new full-featured GM version comes out.

I haven't yet tested the script with 0.3.5, so I don't know if it is the source of the issue.

I'll try it here, and you do the same. Let's see what happens.

9:08 AM, July 25, 2005  
Blogger Andrew said...

Just for comparison's sake - I just installed Greasemonkey 3.5 on a system and don't have the problems described. Could it be that one of the other extentions or any of those other things are conflicting? I haven't installed nearly as much stuff as Marty has. Right now, for example, this is a fresh install of Firefox and GM on a Win2000 box.

11:13 AM, July 25, 2005  
Anonymous Marty said...

I loaded GM 0.3.3 and the Delete button acts exactly the way it should. I tried several different ways to move around the mail list both deleting and going back to the list and by using the "Newer" button. No problems.

As far as having conflicts with other extensions and scripts, I have tested this problem with all other extensions and GM scripts disabled. So now that I have tested it with the older version of GM (with everything enabled) and don't have a problem, it seems clear to be an incompatability between GM 0.3.5 and Gmail Smart-Delete Button.

Thanks for the suggestions and the help with this problem.


5:07 AM, July 26, 2005  
Blogger Paul M. said...

I have to concur with Andrew; I installed 0.3.5 and it is working fine. It is possible that 0.3.5 AND another extension are conflicting.
Depending on how bad you want to isolate this, you could remove the other extensions and add them back one at a time.

Some thoughts regarding your installed extensions:
1.'Mozilla ActiveX control and plugin support' - Allowing activeX to run can be dangerous.
2. 'ChromeEdit' allows easy tweaking of many aspects of FF's behavior and page content. Have you added any mods via that?
3. User Agent Switcher' has been known to cause conflicts with other ext's.
4. ForcastFox - Just an aside - I prefer version 0.7.1. Cleaner graphics and superior data provider. What do you think?

I also DO NOT have the following extensions installed:
-Cookie Button 0.4
-cuneAform 0.3.1
-Mimetype Editor 0.2
-Mnenhy 0.7.2
-Popup ALT Attribute 1.3.2005042001,
Maybe start by disabling them?
I would have suggested adding a few GM_Log statements to the script and capturing the differences between the good and bad pages in the javascript console, but it is a bit complicated due to the lack of a save log capability in the console. To analyze it remotely would be extremely difficult. Especially since you are able to use 0.3.3 OK.

I would either retry installing 0.3.5 to see if the problem returns. (Maybe there was something corrupted.) or, if still a problem, I would sit tight with 0.3.3 (security problems and all) and wait for the next full version of GM.

I'm willing to work with you further if you like.


8:13 AM, July 26, 2005  
Anonymous Marty said...

Well, I don't know why, but the problem is solved. I uninstalled GM 0.3.3, cuneAform and IE View. Then I reinstalled GM 0.3.5 and tested Gmail Smart-Delete Button Ver. 0.4.0. Everything was fine.

I expected it to fail after I reloaded IE View. But it didn't. I have tested this problem every way it failed in the past and it continues to work fine.

I did not reinstall cuneAform. Unless cuneAform caused this, the only other thing I can think of is that I upgraded GM from 0.3.3 to 0.3.5 instead of uninstalling and reinstalling. Upgrading GM means that you don't have to reinstall all your scripts. But if I ever have a script that won't work, I will uninstall GM and reinstall it clean as my first troubleshooting step.

Thanks for all the help. I appreciate it.


7:59 PM, July 26, 2005  
Blogger Andrew said...

Hooray! Success!

4:53 AM, July 27, 2005  
Anonymous Anonymous said...

Hello, I'm using the brand new (fixed, not just nuetered, but fixed) beta version of Greasemonkey... 0.4.1

You can find the link to it on this page: http://dunck.us/collab/GreaseMonkeyUserScripts

Scroll down to the heading of "XPCNativeWrappers and Deer Park compatibility". They explicitly discuss the changes that need to be made for the upcoming versions of Greasemonkey. It seems that with these changes, the Smart-Delete Button has stopped working :(

Is there any chance that you could look into what might need changing in the current code, and perhaps provide an alternate download and/or a description of what to change in the code ourselves.

Thank you in advance.

4:00 PM, July 29, 2005  
Blogger Andrew said...

I'm just a user, not a developer, but let me juts speak my mind quickly... Deer Park is an alpha version. It's not even beta. That means it's a long ways from becoming ready for public consumption (although when I downloaded it for testing purposes it worked fine). If I was a developer, like Paul, I would wait at least until the alpha becomes a little more stable before I began coding for this future release. Lots of things could change between now and then. Just my two cents. I did want to provide direct links, though:


The xpi is attached to the message that the last link points to. It's a bin file, though. I renamed it from bin to xpi, then pointed my browser at it.

1:37 AM, July 31, 2005  
Blogger facted said...

I have not gotten this to work with the 7/29 nightly and GM 5.0. The button does not appear at all. Thanks for the great script though.

11:28 AM, August 01, 2005  
Anonymous Lucas said...

Everytime I try to load gmail with this script installed, I get the following JavaScript Console error message:

http://kuru4u.spymac.com/scripts/Gmail_Smart-Delete_Button.user.js/Gmail Smart-Delete Button: [Main]: ReferenceError: ProcessKeyPressEvent is not defined

The button does not appear. This is with GM .5 beta as posted on the main site.

12:00 PM, August 09, 2005  
Anonymous Anonymous said...

In response to andrew's post a couple above here: the issue isn't that it doesn't work on Deer Park... it's that it doesn't work on the upcoming version of GreaseMonkey.

GreaseMonkey 5 IS the new defacto standard, and if only for the security enhancements, everyone will be upgrading to it in the near future. It would seem important for this script to be ported to a working version soon.


8:58 AM, August 10, 2005  
Blogger eddyjohn1081 said...

This comment has been removed by a blog administrator.

8:09 AM, August 22, 2005  
Blogger Andrew said...

I just installed Greasemonkey 5.1 after Firefox prompted me to do so. I then accessed my Gmail and the smart delete button worked perfectly. So I guess the fear about Greasemonkey and Smart Delete not working was unfounded.

(Also, time to delete the comment spam.)

4:02 AM, August 27, 2005  
Blogger Paul M. said...

It seems like we are OK with GM 5.1. GM apparently worked around the 'XPCNativeWrappers' potential issue.

I was hesitant to modify the code until there was an official GM release for just this reason.

For the near future I will be road testing Smart-Delete to ensure all features are still working as expected with GM 5.1.

If anyone notices any unusual behavior, please bring it to my attention.

Another topic: What new features, if any, would you all like to see included in the next major version of Smart-Delete? Should there be scope creep - i.e.: inclusion of additional buttons such as 'Mark Read', 'Edit Filters', etc?

Another idea I was toying with was to change the Button from 'Delete' to an image (maybe a trashcan or a red 'X' to make it more internationally friendly. What do you think?


9:11 AM, August 27, 2005  
Anonymous facted said...

GM .5.1 and smart-delete .4 don't work on my system using the latest branch build. Tried on a new profile and it still didn't work.

7:11 AM, August 28, 2005  
Anonymous Anonymous said...

Great!!! I use keyboard shortcuts for just about everything. My only suggestion is (and I don't know if it is possible) is to detect Alt+d over d. I keep using Alt+d to get to the address bar and trashing emails. Guess I'll have to get used to using CTRL+L.

4:33 PM, August 28, 2005  
Anonymous Anonymous said...

Just thought I'd add. I changed the script on my machine from trapping 'D', 'd' to 'T', 't' for Trash so it does not conflict with Alt+D.

Thanks again for the great work.

1:45 PM, August 29, 2005  
Blogger Paul M. said...

Hi All,
Sorry that I have been slow in responding to posts lately. I just started a new job and I have been swamped.

Re: Trapping 'alt' key - I'm pretty sure I can do this - It will be the next thing I do.

Once that is done, I'll probably freeze this version and begin in earnest getting a new version to work with the latest FF build.
I haven't, as yet, looked into what changes they made so I won't hazard a guess as to when a new version might be ready.

I'll try to keep you posted as to it's progress.

Also, I'll keep the latest link to the working version live, once a 'beta' new version is released.


9:37 PM, August 30, 2005  
Anonymous Perseus said...


I am sorry to muddy the waters but i have an altogether different problem.

The button enebles and disables itself when it should however after selecting an e-mail and hitting the delete button ends up giving me a gramatically incorrect error message
"You action was unsuccessful.
Please try again."

Even if I try to go and select move to trash from dropbox, result is the same. If I disable this script, the action works.

3:51 PM, August 31, 2005  
Anonymous hall said...

I archive a lot of mail I get at gmail and after tagging a message, I find myself hitting the "a" key on my keyboard. I've gotten used to hitting the "d" key to delete message... :)

So, I realize it doesn't fall under the smart-delete category, but is this something you could add ?? Or do I need to dig around gmail's site more myself ??

11:29 AM, September 01, 2005  
Blogger Paul M. said...

@ Hall:
That is already a feature of Smart-Delete. Select the appropriate email items and press 'D' or 'd' to delete them.

@ Perseus:
I haven't heard from anyone else experiencing this problem.
That message is not coming from Smart-Delete. Also, Smart-Delete does not have anything to do with Gmail's action dropdown other than calling it to 'Move to Trash'.

What versions of FF and GM are you using? Also, what other scripts are you running in GM?

If anyone else is experiencing these messages, leave a comment.

7:58 PM, September 01, 2005  
Anonymous Perseus said...

Hi Paul M,

I have FF v 1.0.6 and GM v 0.5.1

I have quiet a few scripts running. What I am trying to do is to disable them all except Smart Delete and see how it goes. Will post back after trying.



3:17 PM, September 02, 2005  
Anonymous Perseus said...

I Tried that option and still get that error message.

I know it is not your error message. ON Google Groups there is already a issue about this error. But they tent do blame the extension and suggest to disable it and try. Which seems to work.

3:20 PM, September 02, 2005  
Blogger Paul M. said...

@ Perseus

I looked at the Google Groups discussion you mentioned. No conclusions drawn there. I would suggest something mentioned there: Try clearing the browser cache and the cookies if you haven't already done so.

You mentioned you got gmail to work correctly when 'it' was disabled. Are you disabling GM or just the Smart-Delete script? Does the problem exist with GM enabled and all the scripts disabled within?

It's possible that another extension could be interfering. You could try disabling certain other extensions and see if the problem goes away.

If you send me a list of which extensions (and version #'s) you are using I will eliminate the ones I'm using and we can narrow the list of possible problem extensions.

In general, if it was exclusively a Smart-Delete issue, I would be getting literally hundreds of messages from users. As far as I know, other SD users are OK.

6:34 PM, September 02, 2005  
Blogger Andrew said...

Just to confirm your hypothesis, I, another SD user, am OK. It seems to be working great right now.

6:25 PM, September 03, 2005  
Blogger Paul M. said...

Thanks for the positive feedback Andrew. Hope all is well with you.

Hopefully we'll help perseus get it working. Through the process of elimination we should be able to isolate the offending extension or script and figure out a workaround.

I guess at this stage, with the new FF version about to be released, I should stay in a holding pattern regarding code changes. Once the FF and GM platform has stabilized, I'll continue adding features, tweaking the code for performance, etc.

Any and all feedback is greatly appreciated.

6:58 PM, September 03, 2005  
Blogger Andrew said...

Firefox 1.5 has been released as of today. Has anybody heard of an update to Greasemonkey? GM 5.3 doesn't work with FF 1.5....

11:39 AM, September 09, 2005  
Anonymous Anonymous said...

An update is in the works (.6.1.4), but no word on when it will be released. Using it and firefox 1.5 beta, gmail smart-delete still does not work for me.

9:23 PM, September 10, 2005  
Anonymous Anonymous said...

Does anyone have a working version of this for the latest trunk builds and GM 0.6.x?

12:06 PM, September 13, 2005  
Blogger Paul M. said...

Just to give everyone a heads-up on the status of the Smart-Delete project:

Version 4.1 ================================

...an update aimed at FF 1.06 and GM 5.1 is ready to roll out - It features additional key trapping to detect Alt and Ctrl modifiers. No longer will Alt-d or Ctrl-d erroneously trigger email deletion.

Another new feature allows the end user to pick which letter to use for maill deletion. This will accomplished by setting a variable in the script to whichever letter you would like to use and resaving the file.

var TheDeleteKey='d';

This might be best left, however, to users comfortable enough with editing scripts.

The Major roadblock I am facing is that my Spymac account has been the repository for my script. They are currently undergoing a major upgrade and I am unable to push the new ver 4.1 out to the server. If anyone can suggest a better place to host it, please let me know.

Version 5.0b ================================

...a beta release aimed at FF 1.5 and GM 6.1.4 is nearing completion. It incorporates the new features of ver 4.1 and possibly a graphical button image to make it more internationally-friendly (is that actually a phrase?).

Anyway, I have the button correctly displaying and enabling/disabling with the selection of mail items.
All of the events I had been trapping are working with the exception of the button's click event. I can't get it to respond to the click! I had been using the following to set up the button:

var Delete_Button=

Delete_Button.setAttribute('disabled', 'true');

Delete_Button.setAttribute('class', 'ab');

Delete_Button.setAttribute('id', '_gd_Delete_Button'+id);

Delete_Button.setAttribute('onclick', 'deleteItem(this);');

I tried using the following to no avail:

//Delete_Button.addEventListener('click', deleteItem(this), true);

Since this is the only non-system event I am dealing with, my guess is that I need to address the XPCNativeWrapper issue.
Any Ideas???


9:53 PM, September 13, 2005  
Blogger Andrew said...

I don't know if I have a "better" place to host it but I do have a place. My old ISP still has a website directory set up for me. I can access it via FTP and place the script there, if you would like.

My email (please, no spam) is ajpresto at gmail

5:54 AM, September 14, 2005  
Blogger Paul M. said...

This comment has been removed by a blog administrator.

10:59 PM, September 18, 2005  
Blogger Paul M. said...

@ Andrew,
Thanks for your very generous offer. I was able to locate a suitable host for the files. You have been an invaluable ally during the development of this script, from road-testing it to providing moral support - I consider you an integral part of the team. (That might mean more if I was making any money off of this project, but alas...)
Check the main site (http://smart-delete-button.blogspot.com/) for the latest versions. I've got a version 0.5.0 of SD working for the FF 1.5b1 release using GM 6.1.4. If you like, give it a try.
Best regards,

11:10 PM, September 18, 2005  

<< Home