Allowing passing window to loadZoteroPane() support function

This commit is contained in:
Dan Stillman 2015-11-15 17:46:48 -05:00
parent 6d64526648
commit 57dfd1885d

View file

@ -44,8 +44,10 @@ function loadBrowserWindow() {
/**
* Loads a Zotero pane in a new window and selects My Library. Returns the containing window.
*/
var loadZoteroPane = Zotero.Promise.coroutine(function* () {
var win = yield loadBrowserWindow();
var loadZoteroPane = Zotero.Promise.coroutine(function* (win) {
if (!win) {
var win = yield loadBrowserWindow();
}
Zotero.Prefs.clear('lastViewedFolder');
win.ZoteroOverlay.toggleDisplay(true);