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
|
@ -306,8 +306,10 @@ var ZoteroOverlay = new function()
|
||||||
window.zoteroSavedCollectionSelection = ZoteroPane.collectionsView.saveSelection();
|
window.zoteroSavedCollectionSelection = ZoteroPane.collectionsView.saveSelection();
|
||||||
if(tab) { // Zotero is running in a tab
|
if(tab) { // Zotero is running in a tab
|
||||||
if(setMode) return;
|
if(setMode) return;
|
||||||
// don't do anything if Zotero tab is the only tab
|
// if Zotero tab is the only tab, open the home page in a new tab
|
||||||
if(tab && (gBrowser.tabs ? gBrowser.tabs : gBrowser.mTabs).length === 1) return;
|
if((gBrowser.tabs ? gBrowser.tabs : gBrowser.mTabs).length === 1) {
|
||||||
|
gBrowser.addTab(gBrowser.homePage);
|
||||||
|
}
|
||||||
|
|
||||||
// swap ZoteroPane object
|
// swap ZoteroPane object
|
||||||
ZoteroPane = ZoteroPane_Overlay;
|
ZoteroPane = ZoteroPane_Overlay;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user