From 1654545d02ae1dd2f95f960537d2955a29ac3dba Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 21 Mar 2011 20:40:50 +0000 Subject: [PATCH] if not in tab mode and tabs are being saved and Zotero tab is the only tab open in a window, don't close it on startup --- chrome/content/zotero/tab.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/tab.js b/chrome/content/zotero/tab.js index 533d91003d..b829270faf 100644 --- a/chrome/content/zotero/tab.js +++ b/chrome/content/zotero/tab.js @@ -99,7 +99,13 @@ var ZoteroTab = new function() this._swapZoteroPane = function() { if(!this.containerWindow.ZoteroOverlay.isTab) { - window.close(); + var tabs = (this.containerWindow.gBrowser.tabs + ? this.containerWindow.gBrowser.tabs : this.containerWindow.gBrowser.mTabs); + if(tabs.length > 1) { + window.close(); + } else { + this.containerWindow.BrowserGoHome(); + } return; }