add:  var canDelete = true; if (!gStartupMode) { var selected = profileList.selectedItems[0]; var profileName = selected.getAttribute("profile_name"); var currentProfile = profile.currentProfile; if (currentProfile && (profileName == currentProfile)) canDelete = false; } if (canDelete) { if ( delbutton.getAttribute( "disabled" ) == "true" ) delbutton.removeAttribute( "disabled" ); } else delbutton.setAttribute( "disabled", "true" );  
context: function DoEnabling(){  var renbutton = document.getElementById( "renbutton" );  var delbutton = document.getElementById( "delbutton" );  var start     = document.getElementById( "ok" );    var profileList = document.getElementById( "profiles" );  var items = profileList.selectedItems;  if( items.length != 1 )  {    renbutton.setAttribute( "disabled", "true" );    delbutton.setAttribute( "disabled", "true" );    start.setAttribute( "disabled", "true" );  }  else {    if( renbutton.getAttribute( "disabled" ) == "true" )      renbutton.removeAttribute( "disabled", "true" );    if( delbutton.getAttribute( "disabled" ) == "true" )      delbutton.removeAttribute( "disabled", "true" );    if( start.getAttribute( "disabled" ) == "true" )      start.removeAttribute( "disabled", "true" );  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f9502e3ac02aaa545c6601ce0d34cd018b789c5c/profileManager.js/buggy/profile/resources/content/profileManager.js