rem: var selectedItems = dirTree.selectedItems; if (selectedItems.length == 1) { var mailingListUri = selectedItems[0].getAttribute('id'); 
add: if (dirTree.treeBoxObject.selection.count == 1) { var mailingListUri = GetSelectedDirectory(); 
context: function AbEditSelectedDirectory(){  var selectedItems = dirTree.selectedItems;  if (selectedItems.length == 1) {    var mailingListUri = selectedItems[0].getAttribute('id');    var directory = GetDirectoryFromURI(mailingListUri);    if (directory.isMailList) {      var parentURI = selectedItems[0].parentNode.parentNode.getAttribute('id');      goEditListDialog(parentURI, null, mailingListUri, UpdateCardView);    }    else if (!(directory.operations & directory.opWrite))    {      var ldapUrlPrefix = "moz-abldapdirectory://";      if ((mailingListUri.indexOf(ldapUrlPrefix, 0)) == 0)      {        var args = { selectedDirectory: directory.dirName,                     selectedDirectoryString: null};        args.selectedDirectoryString = mailingListUri.substr(ldapUrlPrefix.length, mailingListUri.length);        window.openDialog("chrome://messenger/content/addressbook/pref-directory-add.xul",                      "editDirectory", "chrome,modal=yes,resizable=no", args);      }    }  }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/d38a0937d9c93a0a9d913e2ac781e4328bb8cc73/abCommon.js/buggy/mailnews/addrbook/resources/content/abCommon.js