www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit c107fcf18ad4702f151662fccd363158915fc90c
parent 3bcd421f07d83c14ce2f81db9d1b3152907cd8bb
Author: Simon Kornblith <simon@simonster.com>
Date:   Tue,  1 Feb 2011 06:24:52 +0000

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


Diffstat:
Mchrome/content/zotero/xpcom/zotero.js | 22++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -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,15 +1747,17 @@ Zotero.Keys = new function() { var useShift = Zotero.isMac; // Zotero pane shortcut - var zKey = Zotero.Prefs.get('keys.openZotero'); var keyElem = document.getElementById('key_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' - && (zKey != 'Z' || useShift)) { - keyElem.setAttribute('key', zKey); - if (useShift) { - keyElem.setAttribute('modifiers', 'accel shift'); + 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' + && (zKey != 'Z' || useShift)) { + keyElem.setAttribute('key', zKey); + if (useShift) { + keyElem.setAttribute('modifiers', 'accel shift'); + } } }