rem: applyButton.removeAttribute("disabled"); applyLabel = applyLabel.replace(/%theme_name%/, themeName); uninstallLabel = uninstallLabel.replace(/%theme_name%/, themeName); applyButton.label = applyLabel; uninstallButton.label = uninstallLabel; var locType = selectedItem.getAttribute("loctype"); uninstallButton.disabled = (locType == "install"); var skinName = selectedItem.getAttribute( "name" ); applyButton.disabled = chromeRegistry.isSkinSelected(skinName, DEBUG_USE_PROFILE); 
add:  while (description.hasChildNodes()) description.removeChild(description.firstChild);  nameField.setAttribute("value", themeName); author.setAttribute("value", selectedItem.getAttribute("author")); image.setAttribute("src", selectedItem.getAttribute("image"));   if (!oldTheme) { description.appendChild(descText);  applyButton.removeAttribute("disabled"); applyLabel = applyLabel.replace(/%theme_name%/, themeName); uninstallLabel = uninstallLabel.replace(/%theme_name%/, themeName); applyButton.label = applyLabel; uninstallButton.label = uninstallLabel;  var locType = selectedItem.getAttribute("loctype"); uninstallButton.disabled = (locType == "install"); } else{ applyLabel = gPrefutilitiesBundle.getString("applyThemePrefix"); applyLabel = applyLabel.replace(/%theme_name%/, themeName); applyButton.label = applyLabel;  uninstallLabel = uninstallLabel.replace(/%theme_name%/, themeName); uninstallButton.label = uninstallLabel;  applyButton.setAttribute("disabled", true); uninstallButton.disabled = false;  var newText = gPrefutilitiesBundle.getString("oldTheme"); newText = newText.replace(/%theme_name%/, themeName);  newText = newText.replace(/%brand%/g, gBrandBundle.getString("brandShortName"));  descText = document.createTextNode(newText); description.appendChild(descText); }  
context: function themeSelect(){  var tree = document.getElementById("skinsTree");  var selectedItem = tree.selectedItems.length ? tree.selectedItems[0] : null;  var applyButton = document.getElementById("applySkin");  if (selectedItem && selectedItem.getAttribute("skin") == "true") {    var themeName = selectedItem.getAttribute("displayName");    var nameField = document.getElementById("displayName");    nameField.setAttribute("value", themeName);    var author = document.getElementById("author");    author.setAttribute("value", selectedItem.getAttribute("author"));    var image = document.getElementById("previewImage");    image.setAttribute("src", selectedItem.getAttribute("image"));    var descText = document.createTextNode(selectedItem.getAttribute("description"));    var description = document.getElementById("description");    while (description.hasChildNodes())      description.removeChild(description.firstChild);    description.appendChild(descText);    var uninstallButton = document.getElementById("uninstallSkin");    var applyLabel = gPrefutilitiesBundle.getString("applyThemePrefix");    var uninstallLabel = gPrefutilitiesBundle.getString("uninstallThemePrefix");    applyButton.removeAttribute("disabled");    applyLabel = applyLabel.replace(/%theme_name%/, themeName);    uninstallLabel = uninstallLabel.replace(/%theme_name%/, themeName);    applyButton.label = applyLabel;    uninstallButton.label = uninstallLabel;    var locType = selectedItem.getAttribute("loctype");    uninstallButton.disabled = (locType == "install");    var skinName = selectedItem.getAttribute( "name" );    applyButton.disabled = chromeRegistry.isSkinSelected(skinName, DEBUG_USE_PROFILE);  }  else {    applyButton.setAttribute("disabled", true);  }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/4be03d3937078eaaec0de873a0d36d952a675a21/pref-themes.js/buggy/xpfe/components/prefwindow/resources/content/pref-themes.js