Remove some old Zotero for Firefox code

In particular, remove code related to opening/closing the Zotero pane,
which affects tests. The pane is now opened by default in Firefox, which
brings its behavior closer to the main version.
This commit is contained in:
Dan Stillman 2019-08-26 00:34:06 -04:00
parent 5994e22359
commit 9a49718638
16 changed files with 35 additions and 289 deletions

View file

@ -58,17 +58,24 @@ function loadBrowserWindow() {
*
* @param {Window} [win] - Existing window to use; if not specified, a new window is opened
*/
var loadZoteroPane = Zotero.Promise.coroutine(function* (win) {
var loadZoteroPane = async function (win) {
if (!win) {
var win = yield loadBrowserWindow();
var win = await loadBrowserWindow();
}
Zotero.Prefs.clear('lastViewedFolder');
win.ZoteroOverlay.toggleDisplay(true);
yield waitForItemsLoad(win, 0);
while (true) {
if (win.ZoteroPane && win.ZoteroPane.collectionsView) {
break;
}
Zotero.debug("Waiting for ZoteroPane initialization");
await Zotero.Promise.delay(50);
}
await waitForItemsLoad(win, 0);
return win;
});
};
var loadPrefPane = Zotero.Promise.coroutine(function* (paneName) {
var id = 'zotero-prefpane-' + paneName;