parent
6f506bbc3d
commit
fb148497ba
1 changed files with 12 additions and 0 deletions
|
@ -67,6 +67,18 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
|
|||
return Services.wm.getMostRecentWindow("navigator:browser");
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {ChromeWindow[]} - An array of open windows
|
||||
*/
|
||||
this.getMainWindows = function () {
|
||||
var enumerator = Services.wm.getEnumerator("navigator:browser");
|
||||
var windows = [];
|
||||
while (enumerator.hasMoreElements()) {
|
||||
windows.push(enumerator.getNext());
|
||||
}
|
||||
return windows;
|
||||
};
|
||||
|
||||
this.getActiveZoteroPane = function() {
|
||||
var win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
return win ? win.ZoteroPane : null;
|
||||
|
|
Loading…
Reference in a new issue