From 8a9da660fd2c77500b0465eed0dda1a9112003a8 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 24 Mar 2007 17:28:02 +0000 Subject: [PATCH] Only get the most recent window in ZoteroPane.loadURI() if we need to --- chrome/content/zotero/overlay.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index 6c7f31826d..a8ad906e78 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -1321,12 +1321,12 @@ var ZoteroPane = new function() window.open(uri, "zotero-loaded-page", "menubar=yes,location=yes,toolbar=yes,personalbar=yes,resizable=yes,scrollbars=yes,status=yes"); - var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] - .getService(Components.interfaces.nsIWindowMediator); - var newWindow = wm.getMostRecentWindow("navigator:browser"); - var browser = newWindow.getBrowser(); - if (data && data.attachmentID) { + var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] + .getService(Components.interfaces.nsIWindowMediator); + var newWindow = wm.getMostRecentWindow("navigator:browser"); + //var browser = newWindow.getBrowser(); + newWindow.Zotero_Browser.annotatePage(data.attachmentID); // In case the page has already loaded, update newWindow.Zotero_Browser.updateStatus();