don't try to update keyElem when there is no open zotero key

This commit is contained in:
Simon Kornblith 2011-02-01 06:24:52 +00:00
parent 3bcd421f07
commit c107fcf18a

View file

@ -586,8 +586,8 @@ var Zotero = new function(){
// Initialize various services
Zotero.Integration.init();
if(Zotero.Prefs.get("connector.enabled")) {
Zotero.Connector.init();
if(Zotero.Prefs.get("httpServer.enabled")) {
Zotero.Server.init();
}
Zotero.Zeroconf.init();
@ -1747,8 +1747,9 @@ Zotero.Keys = new function() {
var useShift = Zotero.isMac;
// Zotero pane shortcut
var zKey = Zotero.Prefs.get('keys.openZotero');
var keyElem = document.getElementById('key_openZotero');
if(keyElem) {
var zKey = Zotero.Prefs.get('keys.openZotero');
// Only override the default with the pref if the <key> hasn't been manually changed
// and the pref has been
if (keyElem.getAttribute('key') == 'Z' && keyElem.getAttribute('modifiers') == 'accel alt'
@ -1758,6 +1759,7 @@ Zotero.Keys = new function() {
keyElem.setAttribute('modifiers', 'accel shift');
}
}
}
if (Zotero.Prefs.get('keys.overrideGlobal')) {
var keys = document.getElementsByTagName('key');