From 3bcd421f07d83c14ce2f81db9d1b3152907cd8bb Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 31 Jan 2011 20:28:42 +0000 Subject: [PATCH] add getActiveZoteroPane() call to global Zotero object --- chrome/content/zotero/xpcom/zotero.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 7c3478824..09ba47b70 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -122,6 +122,13 @@ var Zotero = new function(){ Zotero.DB.query(sql, val); }); + this.getActiveZoteroPane = function() { + var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] + .getService(Components.interfaces.nsIWindowMediator); + var win = wm.getMostRecentWindow("navigator:browser"); + return win.getActiveZoteroPane(); + }; + this.getLocalUserKey = function (generate) { if (_localUserKey) { return _localUserKey;