add:   for (var i = gDownloadsView.children.length - 1; i >= 0; --i) { var elm = gDownloadsView.children[i]; var state = elm.getAttribute("state");  if (state != nsIDownloadManager.DOWNLOAD_NOTSTARTED && state != nsIDownloadManager.DOWNLOAD_DOWNLOADING && state != nsIDownloadManager.DOWNLOAD_PAUSED && state != nsIXPInstallManagerUI.INSTALL_DOWNLOADING && state != nsIXPInstallManagerUI.INSTALL_INSTALLING) gDownloadsView.removeChild(gDownloadsView.children[i]); }  
context:   doCommand: function (aCommand)  {    if (aCommand == "cmd_cleanUp" && this.isCommandEnabled(aCommand)) {      gDownloadManager.cleanUp();      this.onCommandUpdate();    }  },  
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/5089b2dda415f7e24f05d326fd9f480edfca8ee5/downloads.js/buggy/toolkit/mozapps/downloads/content/downloads.js