Hacking Gmail

(Grace) #1

102 Part II — Getting Inside Gmail


Listing 6-2:Adding the Delete Button

// ==UserScript==
// @name Gmail Delete Button
// @namespace
http://www.arantius.com/article/arantius/gmail+delete+button/
// @description Add a “Delete” button to Gmail’s interface.
// @include http*://*mail.google.com/*mail*?*
// @version 2.9.1
// ==/UserScript==

//
// Version 2.91:
// - Japanese and Hungarian translation
// Version 2.9:
// - Compatibility upgrade, works in GM 0.6.2 in Firefox 1.5
Beta 1
// Version 2.8.3:
// - Polish translation
// Version 2.8.2:
// - Russian translation
// Version 2.8.1:
// - Bulgarian translation
// Version 2.8:
// - Cleaned up bits of the code. No more global scope
objects.
// - Deer Park compatible.
// Version 2.7.2:
// - Better i81n, file encoded as unicode, to be compatible
with newer
// versions of greasemonkey.
// Version 2.7:
// - Internationalization. If you speak a language other
than english,
// please check the existing text (if there) and/or suggest
the right
// word to mean ‘Delete’ in your language.
// - A change to the default include path.
// Version 2.6:
// - Add button into starred and sent mail section as per
user request.
// - Rework logic to use events (mouse click and key press)
instead of
// timers to further ameliorate lockouts. I’ve recieved at
least one
// report that it was fixed by 2.3, and others that it was
not at 2.5.
Free download pdf