Focus preferences window if already open on Cmd-Comma
This commit is contained in:
parent
874a45ed1c
commit
ff43d1877e
1 changed files with 13 additions and 7 deletions
|
@ -59,13 +59,19 @@
|
|||
|
||||
// Equivalent to Zotero.Utilities.Internal.openPreferences()
|
||||
function openPreferences() {
|
||||
Services.ww.openWindow(
|
||||
null,
|
||||
'chrome://zotero/content/preferences/preferences.xhtml',
|
||||
'zotero-prefs',
|
||||
'chrome,titlebar,centerscreen,resizable=yes',
|
||||
null
|
||||
);
|
||||
let win = Services.wm.getMostRecentWindow('zotero:pref');
|
||||
if (win) {
|
||||
win.focus();
|
||||
}
|
||||
else {
|
||||
Services.ww.openWindow(
|
||||
null,
|
||||
'chrome://zotero/content/preferences/preferences.xhtml',
|
||||
'zotero-prefs',
|
||||
'chrome,titlebar,centerscreen,resizable=yes',
|
||||
null
|
||||
);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<commandset id="mainCommandSet">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue