/* Dynamic Comments... */

Sunday, September 18, 2005

Gmail Smart-Delete Button Ver. 0.5.0 Released!

[for FireFox ver 1.5 Beta 2 & Greasemonkey 6.3 users]

Includes all the new user-requested changes of ver 0.4.1 plus incorporates 'XPC Native Wrappers' for additional security.

1. Smart-Delete now traps for 'Alt' and 'Ctrl' keypresses. These combination keypresses will no longer erroneously trigger mail deletion.

2. User defined keyboard shortcut - User can now set which key they would like to use to trigger mail deletion. (The default letter is 'd', but by editing the script file any letter can be used. Just find the following line of code near the beginning of the script:
var TheDeleteKey='d';
And change the key letter to whichever one you like.
Be careful, though, not to select a shortcut already being used by Gmail!)


(Click to view larger.)

Download here: Gmail Smart-Delete Button Ver. 0.5.0
[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:
/ / / / /

61 Comments:

Anonymous facted said...

Hey Paul-

Thanks so much for making this work on GM .6.2!! Works like a charm. I just wanted to let you know that you should take credit for your work on userscripts.org and maybe even keep the updated script there :)

http://userscripts.org/scripts/show/749

Thanks again!

2:32 PM, September 19, 2005  
Blogger mobile247 said...

hi paul! someone posted a comment on my blog that was meant for you =D great work on the keyboard shortcut btw, works great! =)

If "Paul's Blog" (which happens to be my name too!) is "your site," I want to thank you VERY much for upgrading the Smart Delete Button to 0.5.0 for GreaseMonkey 0.6.2 and Firefox 1.5b. Works like a charm and I'm very appreciative. Cheers and best wishes from a fellow "Palm guy." (I have the T3 and not the Treo - but the Treo is a great unit!)

-- Posted by Anonymous to s.h.a.d.o.w's blog at 9/20/2005 03:19:26 AM

6:40 PM, September 19, 2005  
Blogger Paul M. said...

@ facted
@ s.h.a.d.o.w.

Thanks for the positive feedback - It's the true reward for writing opensource.

It looks like I've got the basic functionality working. There is one quirk I stil need to work on, though.
Namely, I can't find any event that is triggered after deletion of mail. In earlier versions, I had to fall back on using 'SetTimeout' statements to redraw the button at fixed periods after a button click.
This apparently no longer works so the button doesn't redraw until it receives a click or keystroke event.
This a minor cosmetic issue (since it always redraws once you select items to delete) but annoying, nonetheless.
If anyone can suggest a way todetermine when gmail has finished redrawing itself after a mail delete, please let me know.

Thanks guys and happy deleting!
Paul.

8:10 PM, September 19, 2005  
Anonymous facted said...

Seems gmail broke the button :( Doesn't seem to work for me anymore (3:03 pm EST)

12:03 PM, September 20, 2005  
Anonymous Paul_M said...

@ facted

I just tried the SD 4.1/FF 1.06/GM 5.3 combo at work and it works fine. I will try the SD 5.0/FF 1.5b1/GM 6.2 combo when I get home from work. That's the one I assume you are using.

If gmail has changed something, we will adapt.
Regards,
Paul.

1:30 PM, September 20, 2005  
Anonymous facted said...

I am using the .6.2. version along with the latest FF nightly (9/20), though it was working on this nightly and then I checked my mail and it just suddenly stopped so it wasn't that.

4:10 PM, September 20, 2005  
Blogger Paul M. said...

@ facted

I just tried the SD 5.0/FF 1.5b1/GM 6.2 combo and it too still works fine.
Can there be an issue with the nightly build?
Are any errors showing up in the javascript console?

Paul.

7:30 PM, September 20, 2005  
Blogger Andrew said...

It works fine over here with the latest Beta release, not the nightly build. Again, I'm not a developer but I couldn't see programming a script that would be resiliant enough for whatever is thrown its way every night... But it works fine with the latest "stable" release...

5:16 AM, September 21, 2005  
Blogger MC Snowy said...

Paul,

Using SD 5.0/GM 0.6.2/FF 9/20 nightly it doesn't work.

JSC Error:

Error: Component is not available
Source File: gmailsmartdeletebutton50.user.js
Line: 0
Source Code:
0

7:42 AM, September 21, 2005  
Anonymous facted said...

same error for me, but it says that for every script that is suppossed to be run on that page. Also, one of those scripts works on the page, so I don't think that message showing up automatically breaks things.

9:28 AM, September 21, 2005  
Anonymous Anonymous said...

Hi! I've posted your hack to http://www.gmailtools.com :-)

Gianluca .-)

2:38 PM, September 22, 2005  
Blogger Andrew said...

I hope nobody sees this as "comment spam" but every computer I go to needs the new Greasemonkey and it's a pain to find the link. Here's the link to the new Greasemonkey: http://www.mozdev.org/pipermail/greasemonkey/2005-September/005671.html

Again, I have concerns about issues with problems with nightly builds. I don't think that nightly builds should necessarily be supported until they become final. If it's a simple tweak, then fine, but this particular version is designed for FF 1.5 and the new GM....

8:00 AM, September 24, 2005  
Blogger MC Snowy said...

Actually, here's a better link...

9:58 AM, September 24, 2005  
Blogger Maverynthia said...

OK, where's the 1.5b1, GM 6.2 version? I can't find a 6.1.4 version.
Because it's not working...

10:59 AM, September 24, 2005  
Blogger Paul M. said...

Not sure I quite understand the question.

SD ver 5.0 should work fine for FF 1.5b1 with GM 6.1.4 or 6.2...

SD ver 4.1 works with FF 1.0X and GM 5.x...

As far as FF nightly builds go, with my current work schedule, I can't really keep up with them. I will, however, do my best to support all major milestone releases (including betas) of both FF and GM.

Regards,
Paul.

2:40 PM, September 24, 2005  
Blogger facted said...

I went back to the 9/19 nightly build and the button works fine with it. So when you go back and try to get it to work for the 1.5 final release, note that something was changed between 9/19 and 9/20 that broke the button.

8:01 AM, September 26, 2005  
Blogger facted said...

This comment has been removed by a blog administrator.

8:01 AM, September 26, 2005  
Blogger Randy said...

Very nice -- the button I wish GMail had from the start.

A possible improvement would be to have the option to go directly to the next message after the deletion instead of back to the message list.

PS: Interesting that I had to view the "Add Comment" page in IE before it would post...

12:39 PM, September 26, 2005  
Blogger Maverynthia said...

So the 9/19 Nightly is the build to use with 6.2 and 1.5b1? It might just be the build...

1:14 PM, September 27, 2005  
Blogger facted said...

9/19 build is the build to use if you want this button to work. The builds before it seemed to work as well though. I was using the button for a few days before it broke on me when I updated to 9/20.

5:33 AM, September 28, 2005  
Blogger Amy said...

Hi! Just a note to say, thanks for implementing something I've been wanting for a long time! I don't even really care about the button itself, it's the keyboard shortcut that I was after.

I installed this for the first time under firefox 1.5b2, which naturally didn't work, but it does work fine with the 9/18 nightly I still had lying around.

Thanks!

1:46 PM, October 07, 2005  
Blogger Andrew said...

New Firefox Beta out there... I'm not certain why that would make the Gmail Smart delete button not work, but it doesn't work. The button doesn't show up at the Gmail interface.

3:26 PM, October 07, 2005  
Anonymous facted said...

andrew, not sure anyone really knows why things break with the new firefox version, but if you want the button to work, you have to use the 9/19 nightly (branch) or prior. Anything later and the button breaks.

3:24 PM, October 08, 2005  
Blogger Paul M. said...

I 'm not sure what exactly is going on between GreaseMonkey and FireFox, but they are giving us script writers a bad name! Apparently, many, many scripts have simply stopped working with the FF1.5b2.

Apparently, the following error is raised in the javascript console:
"Error: Component is not available
Source File: [filename].user.js
Line: 0, Column: 0
Source Code:
0"


See also:
http://mozdev.org/pipermail/greasemonkey/2005-September/006007.html

Until I can find out more info on what is going on, my suggestion to all Smart-Delete users is to stay with FF 1.5b1 and GM 6.2 which seems to work fine.

Regards,
Paul.

3:28 PM, October 08, 2005  
Blogger Andrew said...

Yep. I'm staying with FF 1.5b1... Just thought I'd report the issue. Thanks for everything!

5:11 AM, October 09, 2005  
Blogger Andrew said...

Well, now FF1.5b1 is forcing an upgrade to Beta 2. That sucks. I guess you should try to take a look at it and update it for this beta. Ugh.

11:39 AM, October 11, 2005  
Anonymous Anonymous said...

Actually, it works fine with Beta 2 still if you upgrade to the 0.6.2.1 test release of Greasemonkey. It's available on the Greasemonkey mailing list here:

http://www.mozdev.org/pipermail/greasemonkey/2005-October/006218.html

Download the one called greasemonkey-0.6.2.1-0001.zip, rename to ".xpi" and install by dragging it onto the Extension Manager. Viola, Smart-Delete-Button works again :)

11:08 AM, October 14, 2005  
Blogger Andrew said...

Hooray! Good catch, anonymous. Don't be a chicken... show yourself.

5:13 AM, October 15, 2005  
Anonymous Anonymous said...

Glad to help Andrew. I don't have a blogger account, but figured you'd like to have the info, so just posted it the easiest way I could.

Anyhow, my name is Tim.

You might want to post the link again if you can, so that the link is actually active. I wasn't sure how to do that through blogger (thought maybe there was some special tag like in phpBB perhaps).

Thanks.

10:23 AM, October 17, 2005  
Blogger Paul M. said...

Hi all,
If you guys like, I can add the GM 6.2.1 link to the Smart-Delete main page.
Let me know...
Paul.

7:19 PM, October 17, 2005  
Blogger Andrew said...

That would be great, Paul.

Nice to see you here, Tim. I hope I didn't offend you. I realized that was pretty harsh right after I posted it.

9:01 AM, October 18, 2005  
Anonymous Anonymous said...

Tim again here.

There's a newer one on the Greasemonkey newsgroup now, so might as well link to that one. It's 0.6.3 and I've just tested it with the Smart-Delete-Button script and it still works great. As before, just download this and rename it to .xpi and install.

Greasemonkey 0.6.3 beta

Hope the link works right.

12:57 PM, October 18, 2005  
Blogger Paul M. said...

Hi Guys,
I updated this post to reflect the latest FF/GM versions:
[for FireFox ver 1.5 Beta 2 & Greasemonkey 6.3 users]

Also I've added the GM 6.3 link to the Smart-Delete main page:

* GreaseMonkey 6.3 Beta
[Just download this file, rename the file extension to .xpi and install.]


Regards,
Paul.

9:59 PM, October 19, 2005  
Blogger Amy said...

I noticed that case is ignored for the keyboard shortcut... I wouldn't mind being able to make it a capital D only, actually, to prevent my accidently hitting the d key. (Yes, I've already hit it by accident once.)

8:56 AM, October 20, 2005  
Blogger Paul M. said...

@ Amy,
If you want to use only a capital D for the shortcut, do this:

1. Search for the following line:
var TheDeleteKey='d';

Change it to read:
var TheDeleteKey='D';

2. Search for the following line:
if ((String.fromCharCode(e.which) == TheDeleteKey) || (String.fromCharCode(e.which + 32) == TheDeleteKey)){

Change it to read:
if (String.fromCharCode(e.which) == TheDeleteKey){

It will now only use exact matches to whichever case you specify...

That SHOULD work, I haven't tested it. Let me know how you make out.
Regards,
Paul.

1:56 PM, October 22, 2005  
Blogger Amy said...

Paul -- thanks! That seems to work perfectly. :)

2:43 PM, October 26, 2005  
Anonymous Ron White said...

Hey, love the script. Are you planning on upgrading it for the 1.5RC?

3:19 PM, November 03, 2005  
Anonymous Anonymous said...

Ron,
Are you using ver 0.5.0? As far as I know it should work with the 1.5RC.
If it doesn't, let me know what issues you are experiencing.
I try to keep the script working for all 'major' releases of Greasemonkey and firefox.
Regards,
Paul_M

8:54 AM, November 04, 2005  
Anonymous Anonymous said...

Hi Paul,

I am responding to the following post on userscripts.org:

Paul Moriak says on Friday, November 04 2005
Hi all, I am the author of the script. I have tried to get the host of this site to add my name & website to this listing, but they did not respond. If you have comments, suggestions , problems, questions, etc. they should be posted to the http://smart-delete-button.blogspot.com/ site. I will not be regularly checking other sites, such as this one, so if you want a reply to an issue you should go to my site. Thanks, Paul_M

I have just created a user account and notice that there is a claim your script under "manage your account".

According to the site:
"Uploading your new revision!

Make sure you're logged in, go to your scripts page, and click Update Script. You can then specify the url (which can be new or the same) or upload a copy to be hosted here."

To claim your script it is registered under the kuru4u.spymac.com url.

Regards,
Antony

3:13 AM, November 08, 2005  
Blogger madhatter said...

Hello,

I can't download the new script. I always get a "Forbidden"-Message, when clicking on that link.

4:18 AM, November 14, 2005  
Blogger Paul M. said...

I just tried the link and it is fine. Is your firewall blocking it? Check your settings.

If you e-mail me I can attach a copy of the script to the reply...
Paul.

10:04 AM, November 14, 2005  
Blogger Andrew said...

I get that error if I try to click straight through. If I right-click and choose "Install user script" it works fine.

I think 50megs has a policy against hotlinking files from one server to another...

5:18 PM, November 14, 2005  
Anonymous DeepFreeze3 said...

Installed Greasemokey 0.6.3 and the userscript for Gmail Smart-Delete Button 5.0 in FF 1.5, and it didn't work at all.

4:35 PM, November 28, 2005  
Anonymous Anonymous said...

Doesn't work at all. Firefox 1.5RC3, Greasmonkey 0.6.2, Windows XP Pro. No button showing up on gmail.

8:30 PM, November 28, 2005  
Blogger sami said...

there is no more space on 50meg.com

3:47 AM, November 29, 2005  
Blogger Paul M. said...

@ DeepFreeze3,
I just installed FF 1.5 rc3, Greasemonkey 0.6.3 and Smart-Delete is working OK...

@ Anonymous,
You need to upgrade Greasemonkey from 0.6.2 to 0.6.3...

@ Sami,
re: 'there is no more space on 50meg.com'
I don't understand the comment... There is no problem with the hosted script, I just tried accessing it.

10:10 AM, November 29, 2005  
Anonymous Simon Pope said...

I can't download the 0.5.0 update -- I get this error when I click on the link:


Forbidden
Remote Host: [203.45.189.20]

You do not have permission to access http://smart-delete.50megs.com/download/%5B0.5.0%5D%20Gmail_Smart-Delete_Button.user.js

Data files must be stored on the same site they are linked from.

Thank you for using 50megs

3:22 PM, November 29, 2005  
Blogger Paul M. said...

@ Simon Pope,
[To install, right-click the above link & choose 'Install User Script...' from context menu.]

3:31 PM, November 29, 2005  
Blogger Meetesh said...

Upgraded to Greasemokey 0.6.3 and the userscript for Gmail Smart-Delete Button 5.0 in FF 1.5 and the delete button doesn't show up in gmail. I'm getting the same "Component is not available" message mentioned in other previous comments.

Thanks for all of your work btw!

8:41 AM, November 30, 2005  
Blogger Meetesh said...

Sorry, apparently the 0.6.3 upgrade didn't work and I still had 0.6.2. After upgrading, it now works. Thanks!

8:45 AM, November 30, 2005  
Blogger Meetesh said...

Back again ... I'm using Smart-Delete 0.5.0, Greasemonkey 0.6.3 and FF 1.5 on Windows XP. I use the keyboard shortcuts for gmail and it used to be that when I selected a email (ie, using 'x'), the delete button would enable itself and I could use it or the 'd' keyboard shortcut. However, now that only works when I use the mouse to select the email or if I click on the page anywhere after selecting the email using the keyboard.

Any thoughts? Thanks

11:25 AM, November 30, 2005  
Anonymous Anonymous said...

broken after installing greasemonkey 0.6.3, a fix would be great.

12:04 AM, December 01, 2005  
Anonymous Anonymous said...

er... in the previous comment i meant to say 0.6.4

12:04 AM, December 01, 2005  
Anonymous Anonymous said...

OS X Tiger, FF 1.5, GM 0.6.4, Smart-Delete 5.0: no delete button is appearing.

Looking forward to a fix, thanks for this great script! I especially appreciate the Delete button not being next to the Archive button, which is what other Delete scripts do.

3:42 AM, December 01, 2005  
Anonymous Anonymous said...

Oops, ignore OS X Tiger problem above: I simply had not restarted FF 1.5 after updating GreaseMonkey. Apologies!

3:47 AM, December 01, 2005  
Blogger Paul M. said...

@Meetesh,
There is currently an issue with the button redrawing after certain actions, namely deleting items, where Gmail doesn't refresh the entire page.

I can't find any event that gets triggered after a deletion that I can utilize to redraw the button.
(That's why you need to click somewhere on the page - I trap for the click event.)

If anyone can figure this out, I'll update the code ASAP.

Regards,
Paul.

11:03 AM, December 01, 2005  
Blogger Paul M. said...

To those using GM 0.6.4:

As far as GreaseMonkey 0.6.4 goes, it seems that with each new version, they break many scripts!

Chances are GM will issue a newer version fixing the problem very soon.

I'll need to install this one and see what errors there are. Problem is though, I'm swamped at work, so I really don't want to be chasing after every change GM makes.

Obviously, if 0.6.4 becomes a stable release I'll get the script to work with it. But for now, I'm waiting a bit for more GM changes.

11:08 AM, December 01, 2005  
Blogger Meetesh said...

Thanks for the information Paul. I'm definitely seeing that behavior. Is there a way that you can trap keypresses as well and refresh the button on them? With previous versions, I used to be able to use a gmail keyboard shortcut to select emails and then delete them. Unfortunately that doesn't seem to work anymore.

Good luck at work!

11:39 AM, December 01, 2005  
Blogger 123 123 said...

Interesting story as for me. It would be great to read a bit more concerning that topic. Thank you for posting this data.
Sexy Lady
UK escort

2:58 AM, December 11, 2009  
Blogger mrsam said...

legal steroidsmedsFemale sterilization is an almost permanent method of contraception for women. Let us take a look at some information about female sterilization options.

9:24 PM, August 18, 2011  
Blogger alex walker said...

Great Work!!!
I am very thankful to share this post.. I hope you have more information about this post.. So, Please share me.. Thanks..
More info:- Gmail Help

3:12 AM, May 16, 2014  

Post a Comment

<< Home