rem:  if (permissions.length == 0) { document.getElementById("removeAllPermissions").setAttribute("disabled","true"); } else { document.getElementById("removeAllPermissions").removeAttribute("disabled"); } 
add: if (permissions.length == 0) persissionsExist = false; else persissionsExist = true;  togglePermissionEnabling(); 
context: function loadPermissions() {  // load permissions into a table  if (!permissionsTree)    permissionsTree = document.getElementById("permissionsTree");  var enumerator = permissionmanager.enumerator;  var count = 0;  var contentStr;  var dialogType = "popup"; // Popups    while (enumerator.hasMoreElements()) {    var nextPermission = enumerator.getNext();    nextPermission = nextPermission.QueryInterface(Components.interfaces.nsIPermission);    if (nextPermission.type == dialogType) {      var host = nextPermission.host;      permissions[count] =         new Permission(count++, host,                      (host.charAt(0)==".") ? host.substring(1,host.length) : host,                      nextPermission.type,                      "");    }  }  permissionsTreeView.rowCount = permissions.length;  // sort and display the table  permissionsTree.treeBoxObject.view = permissionsTreeView;    // disable "remove all" button if there are no popups  if (permissions.length == 0) {    document.getElementById("removeAllPermissions").setAttribute("disabled","true");  } else {    document.getElementById("removeAllPermissions").removeAttribute("disabled");  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/d4a340a0fe512fd3e39380349edd929ca2156f3a/pref-features.js/clean/browser/components/prefwindow/content/pref-features.js