www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit de56c2567fbc9f8a87be1940c43fa4e8de9ca861
parent bc354b1435939cda312bcab97e61aea2855a20f2
Author: Simon Kornblith <simon@simonster.com>
Date:   Thu, 19 May 2011 23:20:07 +0000

closes #1797, Toggle tab mode button when no non-Zotero tabs are open

clicking the toggle tab button when the Zotero tab is the only tab open will now open the home page


Diffstat:
Mchrome/content/zotero/overlay.js | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js @@ -306,8 +306,10 @@ var ZoteroOverlay = new function() window.zoteroSavedCollectionSelection = ZoteroPane.collectionsView.saveSelection(); if(tab) { // Zotero is running in a tab if(setMode) return; - // don't do anything if Zotero tab is the only tab - if(tab && (gBrowser.tabs ? gBrowser.tabs : gBrowser.mTabs).length === 1) return; + // if Zotero tab is the only tab, open the home page in a new tab + if((gBrowser.tabs ? gBrowser.tabs : gBrowser.mTabs).length === 1) { + gBrowser.addTab(gBrowser.homePage); + } // swap ZoteroPane object ZoteroPane = ZoteroPane_Overlay;