rem: var folderTree = GetFolderTree(); var selectedFolders = folderTree.selectedItems; var numFolders = selectedFolders.length; 
add: var folderOutliner = GetFolderOutliner(); var startIndex = {}; var endIndex = {}; folderOutliner.outlinerBoxObject.selection.getRangeAt(0, startIndex, endIndex); if (startIndex.value < 0) return false; 
context: function IsCompactFolderEnabled(){    var folderTree = GetFolderTree();    var selectedFolders = folderTree.selectedItems;    var numFolders = selectedFolders.length;    if (numFolders <= 0 )        return false;    var folder = selectedFolders[0];    if (!folder)        return false;    return (folder.getAttribute('CanCompact') == "true" && isCommandEnabled("cmd_compactFolder"));}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/938770831965cde1ef5c4ce945b768186518efae/mailWindowOverlay.js/clean/mailnews/base/resources/content/mailWindowOverlay.js