rem: if (gBrowser.localName == "tabbrowser" && window.toolbar.visible && 
add: if (window.toolbar.visible && 
context: function BrowserCloseTabOrWindow(){#ifdef XP_MACOSX  // If we're not a browser window, just close the window  if (window.location.href != getBrowserURL()) {    closeWindow(true);    return;  }#endif  // XXXzeniko why do we check for gBrowser's localName (it's rather undefined  //           than actually a different element, isn't it)?  if (gBrowser.localName == "tabbrowser" &&      gBrowser.tabContainer.childNodes.length > 1) {    // Just close up a tab.    gBrowser.removeCurrentTab();    return;  }#ifndef XP_MACOSX  if (gBrowser.localName == "tabbrowser" && window.toolbar.visible &&      !gPrefService.getBoolPref("browser.tabs.autoHide")) {    // Replace the remaining tab with a blank one and focus the address bar    gBrowser.removeCurrentTab();    if (gURLBar)      setTimeout(function() { gURLBar.focus(); }, 0);    return;  }#endif  BrowserCloseWindow();}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/f53482b40e6862988debec4eb902d4bb72f80427/browser.js/clean/browser/base/content/browser.js