To try the thousands of add-ons available here, download Mozilla Firefox, a fast, free way to surf the Web!
CloseWelcome to Firefox Add-ons.
Choose from thousands of extra features and styles to make Firefox your own.
CloseReview for Purge! by pastisman
Rated 2 out of 5 stars
Hi,
With the Custom buttons extension , simply add a button with the code :
var acctMgr = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);
var accounts = acctMgr.accounts;
for (var i = 0; i < accounts.Count(); i++) {
var account = accounts.QueryElementAt(i, Components.interfaces.nsIMsgAccount);
var rootFolder = account.incomingServer.rootFolder; // nsIMsgFolder
if (rootFolder.hasSubFolders)
{
var subFolders = rootFolder.subFolders; // nsIMsgFolder
while(subFolders.hasMoreElements())
{
var folder = subFolders.getNext().QueryInterface(Components.interfaces.nsIMsgFolder);
if( folder.flags & 0x0100 ) try { folder.emptyTrash(null, null); } catch(ex) {}
}
}
}
goDoCommand('cmd_compactFolder');
in it.
To create your own collections, you must have a Mozilla Add-ons account.