rem: var canStr, cannotStr; if (dialogType == cookieType) { canStr="can"; cannotStr="cannot"; } else if (dialogType == imageType) { canStr="canImages"; cannotStr="cannotImages"; } else { canStr="canPopups"; cannotStr="cannotPopups"; 
add: var canStr, cannotStr, canSessionStr; switch (dialogType) { case cookieType: canStr="can"; canSessionStr="canSession"; cannotStr="cannot"; break; case imageType: canStr="canImages"; cannotStr="cannotImages"; break; case popupType: canStr="canPopups"; cannotStr="cannotPopups"; break; default: return; 
context: function loadPermissions() {  // load permissions into a table  var enumerator = permissionmanager.enumerator;  var count = 0;  var contentStr;  var canStr, cannotStr;  if (dialogType == cookieType) {    canStr="can";    cannotStr="cannot";  } else if (dialogType == imageType) {    canStr="canImages";    cannotStr="cannotImages";  } else {    canStr="canPopups";    cannotStr="cannotPopups";  }  while (enumerator.hasMoreElements()) {    var nextPermission = enumerator.getNext();    nextPermission = nextPermission.QueryInterface(Components.interfaces.nsIPermission);    if (nextPermission.type == dialogType) {      var host = nextPermission.host;      var capability = ( nextPermission.capability == nsIPermissionManager.ALLOW_ACTION ) ? true : false;      permissions[count] =         new Permission(count++, host,                       (host.charAt(0)==".") ? host.substring(1,host.length) : host,                       nextPermission.type,                       cookieBundle.getString(capability?canStr:cannotStr));    }  }  permissionsTreeView.rowCount = permissions.length;  // sort and display the table  permissionsTree.treeBoxObject.view = permissionsTreeView;  PermissionColumnSort('rawHost', false);  // disable "remove all" button if there are no cookies/images  if (permissions.length == 0) {    document.getElementById("removeAllPermissions").setAttribute("disabled","true");  } else {    document.getElementById("removeAllPermissions").removeAttribute("disabled");  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/1683da5f165326a8ffc3638af9c854102822af4d/cookieViewer.js/clean/suite/common/permissions/cookieViewer.js