Webmail Management Bookmarklet

Relates to DOM Scripting and Peregrinations

The age old problem - spam! While I patiently wait for that elusive Gmail invite, I am still running a couple of old webmail accounts that have been active for several years. I would be content to disable them except for the occassional critical email I receive. So once every 5 or 10 days I will log into the accounts and spend the best part of half an hour selecting and deleting anywhere from 1000 to 2000 spam emails just to find those few important messages. Fortunately the Inbox can display 1000 messages on a page and, accompanied by the select all button, this speeds up the process slightly, but I still have to deselect all the archived messages. This seemed like the perfect opportunity to write a boomarklet to speed things up a bit.

Of course this bookmarklet is proprietary with the DOM navigation specific (and quite cumbersome!) to the layout of my Webmail Inbox, but perhaps you may find it useful for editing to your requirements?

  var a = confirm(%22Do you wish to select?%22);
  var rn = prompt(%22Enter range of cells to %22 + 
                 ((a) ? %22select%22 : %22deselect%22)); 
  var r = rn.split('-'); 
  var rows = window.frames[3].document. _
             getElementsByTagName('table'). _
  var min = parseInt(r[0]) + 2, max; 
  max = (r.length == 1) ? rows.length : parseInt(r[1]) + 3; 
  for (i = min; i < max; i++) {
   rows.item(i).getElementsByTagName(%22a%22).item(0). _
    nextSibling.checked = a;

Note, the _ character is just a line continuation. Has made my webmail routine that bit easier, more efficient and fulfilling :)

Posted on Saturday, Jul 10, 2004 at 17:42:59.

Comments on Webmail Management Bookmarklet (0)

Breadcrumbs Trail

[ Home ] -> TW Blog -> Jul 04 -> Webmail Management Bookmarklet
Site Map

The Severn Solutions website achieves the following standards:

[ XHTML 1.0 ] [ CSS 2 ] [ WAI AA ] [ Bobby AA ]

Page compiled in 0.008 seconds