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
This commit is contained in:
parent
bc354b1435
commit
de56c2567f
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue