rem: var selection = gHistoryTree.selectedItems; if (selection && selection.length > 0) { var url = selection[0].id; 
add: var currentIndex = gHistoryOutliner.currentIndex; var rowIsContainer = isContainer(gHistoryOutliner, currentIndex); var url = gHistoryOutliner.outlinerBoxObject.view.getCellText(currentIndex, "URL");  if (url && !rowIsContainer) { 
context: function historyOnSelect(event){    // every time selection changes, save the last hostname    gLastHostname = "";    gLastDomain = "";    var match;    var selection = gHistoryTree.selectedItems;    if (selection && selection.length > 0) {        var url = selection[0].id;        // matches scheme://(hostname)...        match = url.match(/.*:\/\/([^\/:]*)/);        if (match && match.length>1)            gLastHostname = match[1];                if (gHistoryStatus)            gHistoryStatus.label = url;    } else {        if (gHistoryStatus)            gHistoryStatus.label = "";    }    if (gLastHostname) {        // matches the last foo.bar in foo.bar or baz.foo.bar        match = gLastHostname.match(/([^.]+\.[^.]+$)/);        if (match)            gLastDomain = match[1];    }    document.commandDispatcher.updateCommands("select");}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/649e7260b21e1aff69bcdf02d6d213823602b19b/history.js/clean/suite/common/history/history.js