diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index a1e8857d07..f08f363b01 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -1914,7 +1914,7 @@ function handleShowInPreferenceChange() { /** * Opens a URI in the basic viewer in Standalone, or a new window in Firefox */ -function openInViewer(uri) { +function openInViewer(uri, newTab) { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); const features = "menubar=yes,toolbar=no,location=no,scrollbars,centerscreen,resizable"; @@ -1930,7 +1930,11 @@ function openInViewer(uri) { } else { var win = wm.getMostRecentWindow("navigator:browser"); if(win) { - win.open(uri, null, features); + if(newTab) { + win.gBrowser.selectedTab = win.gBrowser.addTab(uri); + } else { + win.open(uri, null, features); + } } else { var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] diff --git a/chrome/content/zotero/preferences/preferences.xul b/chrome/content/zotero/preferences/preferences.xul index d73f0ad6dd..2058aca637 100644 --- a/chrome/content/zotero/preferences/preferences.xul +++ b/chrome/content/zotero/preferences/preferences.xul @@ -800,9 +800,9 @@ To add a new preference: -