add: case "site": document.getElementById("groupBySite").setAttribute("checked", "true"); break; 
context: function HistoryCommonInit(){    gHistoryTree =  document.getElementById("historyTree");    gDeleteByHostname = document.getElementById("menu_deleteByHostname");    gDeleteByDomain =   document.getElementById("menu_deleteByDomain");    gHistoryBundle =    document.getElementById("historyBundle");    gHistoryStatus =    document.getElementById("statusbar-display");    var treeController = new nsTreeController(gHistoryTree);    var historyController = new nsHistoryController;    gHistoryTree.controllers.appendController(historyController);    if ("arguments" in window && window.arguments[0] && window.arguments.length >= 1) {        // We have been supplied a resource URI to root the tree on        var uri = window.arguments[0];        gHistoryTree.setAttribute("ref", uri);        if (uri.substring(0,5) == "find:" &&            !(window.arguments.length > 1 && window.arguments[1] == "newWindow")) {            // Update the windowtype so that future searches are directed             // there and the window is not re-used for bookmarks.             var windowNode = document.getElementById("history-window");            windowNode.setAttribute("windowtype", "history:searchresults");            windowNode.setAttribute("title", gHistoryBundle.getString("search_results_title"));        }        document.getElementById("groupingMenu").setAttribute("hidden", "true");    }    else {        gPrefService = Components.classes["@mozilla.org/preferences-service;1"]                                 .getService(Components.interfaces.nsIPrefBranch);        try {            gHistoryGrouping = gPrefService.getCharPref("browser.history.grouping");        }        catch(e) {            gHistoryGrouping = "day";        }        GroupBy(gHistoryGrouping);        if (gHistoryStatus) {  // must be the window            switch(gHistoryGrouping) {            case "none":                document.getElementById("groupByNone").setAttribute("checked", "true");                break;            case "day":            default:                document.getElementById("groupByDay").setAttribute("checked", "true");            }                }        else {  // must be the sidebar panel            var pb = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);            var pbi = pb.QueryInterface(Components.interfaces.nsIPrefBranchInternal);            pbi.addObserver("browser.history.grouping", groupObserver, false);        }    }     SortInNewDirection(find_sort_direction(find_sort_column()));    gHistoryTree.treeBoxObject.view.selection.select(0);}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/795733738a9ff4504c53359834fdec4accb4dc44/history.js/buggy/suite/common/history/history.js