rem: var min = new Object(); var max = new Object(); var rangeCount = gHistoryOutliner.outlinerBoxObject.view.selection.getRangeCount(); for (var i = 0; i < rangeCount; ++i) { gHistoryOutliner.outlinerBoxObject.view.selection.getRangeAt(i, min, max); for (var k = max.value; k >= min.value; --k) { if (isContainer(gHistoryOutliner, k)) return false; 
add: if (gHistoryGrouping == "day") { var min = new Object(); var max = new Object(); var rangeCount = gHistoryOutliner.outlinerBoxObject.view.selection.getRangeCount(); for (var i = 0; i < rangeCount; ++i) { gHistoryOutliner.outlinerBoxObject.view.selection.getRangeAt(i, min, max); for (var k = max.value; k >= min.value; --k) { if (isContainer(gHistoryOutliner, k)) return false; } 
context: function updateItems(){  var count = gHistoryOutliner.outlinerBoxObject.view.selection.count;  var openItem = document.getElementById("miOpen");  var openItemInNewWindow = document.getElementById("miOpenInNewWindow");  if (count > 1) {    document.getElementById("miAddBookmark").setAttribute("label", document.getElementById('multipleBookmarks').getAttribute("label"));    var min = new Object();     var max = new Object();    var rangeCount = gHistoryOutliner.outlinerBoxObject.view.selection.getRangeCount();    for (var i = 0; i < rangeCount; ++i) {      gHistoryOutliner.outlinerBoxObject.view.selection.getRangeAt(i, min, max);      for (var k = max.value; k >= min.value; --k) {        if (isContainer(gHistoryOutliner, k))                    return false;      }    }    openItem.setAttribute("hidden", "true");    openItem.removeAttribute("default");    openItemInNewWindow.setAttribute("default", "true");  }  else {    document.getElementById("miAddBookmark").removeAttribute("disabled");    document.getElementById("miAddBookmark").setAttribute("label", document.getElementById('oneBookmark').getAttribute("label"));    var currentIndex = gHistoryOutliner.currentIndex;    if (isContainer(gHistoryOutliner, currentIndex))      return false;    if (!gWindowManager) {      gWindowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].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: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/ef455cc8611b27f4a3b5dc247da15784f83f0060/history.js/buggy/xpfe/components/history/resources/history.js