rem: if (hasContainer) { bookmarkItem.setAttribute("hidden", "true"); copyLocationItem.setAttribute("hidden", "true"); sep1.setAttribute("hidden", "true"); document.getElementById("post-bookmarks-separator").setAttribute("hidden", "true"); openItem.setAttribute("hidden", "true"); openItemInNewWindow.setAttribute("hidden", "true"); collapseExpandItem.setAttribute("hidden", "true"); 
add: collapseExpandItem.hidden = true; openItem.hidden = true; if (hasContainer) { bookmarkItem.hidden = true; copyLocationItem.hidden = true; sep1.hidden = true; sep2.hidden = true; openItemInNewWindow.hidden = true; openItemInNewTab.hidden = true; 
context: function updateItems(){  var count = gHistoryTree.treeBoxObject.view.selection.count;  var openItem = document.getElementById("miOpen");  var bookmarkItem = document.getElementById("miAddBookmark");  var copyLocationItem = document.getElementById("miCopyLinkLocation");  var sep1 = document.getElementById("pre-bookmarks-separator");  var openItemInNewWindow = document.getElementById("miOpenInNewWindow");  var collapseExpandItem = document.getElementById("miCollapseExpand");  if (count > 1) {    var hasContainer = false;    if (gHistoryGrouping != "none") {      var min = new Object();       var max = new Object();      var rangeCount = gHistoryTree.treeBoxObject.view.selection.getRangeCount();      for (var i = 0; i < rangeCount; ++i) {        gHistoryTree.treeBoxObject.view.selection.getRangeAt(i, min, max);        for (var k = max.value; k >= min.value; --k) {          if (isContainer(gHistoryTree, k)) {            hasContainer = true;            break;          }        }      }    }    if (hasContainer) {      bookmarkItem.setAttribute("hidden", "true");      copyLocationItem.setAttribute("hidden", "true");      sep1.setAttribute("hidden", "true");      document.getElementById("post-bookmarks-separator").setAttribute("hidden", "true");      openItem.setAttribute("hidden", "true");      openItemInNewWindow.setAttribute("hidden", "true");      collapseExpandItem.setAttribute("hidden", "true");    }    else {      bookmarkItem.removeAttribute("hidden");      copyLocationItem.removeAttribute("hidden");      sep1.removeAttribute("hidden");      bookmarkItem.setAttribute("label", document.getElementById('multipleBookmarks').getAttribute("label"));      openItem.setAttribute("hidden", "true");      openItem.removeAttribute("default");      openItemInNewWindow.setAttribute("default", "true");    }  }  else {    bookmarkItem.setAttribute("label", document.getElementById('oneBookmark').getAttribute("label"));    var currentIndex = gHistoryTree.currentIndex;    if (isContainer(gHistoryTree, currentIndex)) {        openItem.setAttribute("hidden", "true");        openItem.removeAttribute("default");        collapseExpandItem.removeAttribute("hidden");        collapseExpandItem.setAttribute("default", "true");        bookmarkItem.setAttribute("hidden", "true");        copyLocationItem.setAttribute("hidden", "true");        sep1.setAttribute("hidden", "true");        if (isContainerOpen(gHistoryTree, currentIndex)) {          collapseExpandItem.setAttribute("label", gHistoryBundle.getString("collapseLabel"));          collapseExpandItem.setAttribute("accesskey", gHistoryBundle.getString("collapseAccesskey"));        }        else {          collapseExpandItem.setAttribute("label", gHistoryBundle.getString("expandLabel"));          collapseExpandItem.setAttribute("accesskey", gHistoryBundle.getString("expandAccesskey"));                  }        return true;    }    collapseExpandItem.setAttribute("hidden", "true");    bookmarkItem.removeAttribute("hidden");    copyLocationItem.removeAttribute("hidden");    sep1.removeAttribute("hidden");    if (!gWindowManager) {      gWindowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();      gWindowManager = gWindowManager.QueryInterface( Components.interfaces.nsIWindowMediator);    }    var topWindowOfType = gWindowManager.getMostRecentWindow("navigator:browser");    if (!topWindowOfType) {        openItem.setAttribute("hidden", "true");        openItem.removeAttribute("default");        openItemInNewWindow.setAttribute("default", "true");    }    else {      openItem.removeAttribute("hidden");      if (!openItem.getAttribute("default"))        openItem.setAttribute("default", "true");      openItemInNewWindow.removeAttribute("default");    }  }  return true;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/282f0520923fe488a3c7246e0d8ce1073623f9c3/history.js/clean/xpfe/components/history/resources/history.js