let toggleTab() take an explicit mode argument
This commit is contained in:
parent
90b7380563
commit
e26b292324
1 changed files with 3 additions and 1 deletions
|
@ -302,9 +302,10 @@ var ZoteroOverlay = new function()
|
||||||
/**
|
/**
|
||||||
* Toggle between Zotero as a tab and Zotero as a pane
|
* Toggle between Zotero as a tab and Zotero as a pane
|
||||||
*/
|
*/
|
||||||
this.toggleTab = function() {
|
this.toggleTab = function(setMode) {
|
||||||
var tab = this.findZoteroTab();
|
var tab = this.findZoteroTab();
|
||||||
if(tab) { // Zotero is running in a tab
|
if(tab) { // Zotero is running in a tab
|
||||||
|
if(setMode) return;
|
||||||
// don't do anything if Zotero tab is the only tab
|
// don't do anything if Zotero tab is the only tab
|
||||||
if(tab && gBrowser.tabs.length === 1) return;
|
if(tab && gBrowser.tabs.length === 1) return;
|
||||||
|
|
||||||
|
@ -316,6 +317,7 @@ var ZoteroOverlay = new function()
|
||||||
this.isTab = false;
|
this.isTab = false;
|
||||||
this.toggleDisplay();
|
this.toggleDisplay();
|
||||||
} else { // Zotero is running in the pane
|
} else { // Zotero is running in the pane
|
||||||
|
if(setMode === false) return;
|
||||||
// close Zotero pane
|
// close Zotero pane
|
||||||
this.toggleDisplay();
|
this.toggleDisplay();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue