parent
5bdb050b5f
commit
1475a79cd1
2 changed files with 9 additions and 5 deletions
|
@ -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"]
|
||||
|
|
|
@ -800,9 +800,9 @@ To add a new preference:
|
|||
<groupbox>
|
||||
<caption label="&zotero.preferences.miscellaneous;"/>
|
||||
<hbox align="center">
|
||||
<button id="openAboutConfig" label="&zotero.preferences.openAboutConfig;" oncommand="openInViewer('about:config', '')"/>
|
||||
<button id="openCSLEdit" label="&zotero.preferences.openCSLEdit;" oncommand="openInViewer('chrome://zotero/content/tools/csledit.xul', '')"/>
|
||||
<button id="openCSLPreview" label="&zotero.preferences.openCSLPreview;" oncommand="openInViewer('chrome://zotero/content/tools/cslpreview.xul', '')"/>
|
||||
<button id="openAboutConfig" label="&zotero.preferences.openAboutConfig;" oncommand="openInViewer('about:config')"/>
|
||||
<button id="openCSLEdit" label="&zotero.preferences.openCSLEdit;" oncommand="openInViewer('chrome://zotero/content/tools/csledit.xul', true)"/>
|
||||
<button id="openCSLPreview" label="&zotero.preferences.openCSLPreview;" oncommand="openInViewer('chrome://zotero/content/tools/cslpreview.xul', true)"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
|
|
Loading…
Reference in a new issue