www

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

commit 5814bdcd8481fa28bf66624dc2e9b57a30a41953
parent 6c74d670d1fa52e458ae5f4915f4c4756f6b23dc
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon, 28 Apr 2014 20:42:43 -0400

Don't try to icon guidance on initialization failure

Diffstat:
Mchrome/content/zotero/overlay.js | 28++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js @@ -110,6 +110,20 @@ var ZoteroOverlay = new function() document.persist(toolbar.id, "currentset"); } } + + if (icon.getAttribute("cui-areatype") == "toolbar") { + window.setTimeout(function() { + var isUpgrade = false; + try { + isUpgrade = Zotero.Prefs.get("firstRunGuidanceShown.saveIcon"); + } catch(e) {} + + var property = "firstRunGuidance.toolbarButton."+(isUpgrade ? "upgrade" : "new"); + var shortcut = Zotero.getString(Zotero.isMac ? "general.keys.cmdShift" : "general.keys.ctrlShift")+ + Zotero.Prefs.get("keys.openZotero"); + document.getElementById("zotero-toolbar-button-guidance").show(null, Zotero.getString(property, shortcut)); + }, 0); + } } } else { @@ -134,20 +148,6 @@ var ZoteroOverlay = new function() icon.setAttribute('tooltiptext', errMsg); icon.setAttribute('error', 'true'); } - - if (icon.getAttribute("cui-areatype") == "toolbar") { - window.setTimeout(function() { - var isUpgrade = false; - try { - isUpgrade = Zotero.Prefs.get("firstRunGuidanceShown.saveIcon"); - } catch(e) {} - - var property = "firstRunGuidance.toolbarButton."+(isUpgrade ? "upgrade" : "new"); - var shortcut = Zotero.getString(Zotero.isMac ? "general.keys.cmdShift" : "general.keys.ctrlShift")+ - Zotero.Prefs.get("keys.openZotero"); - document.getElementById("zotero-toolbar-button-guidance").show(null, Zotero.getString(property, shortcut)); - }, 0); - } // Used for loading pages from upgrade wizard if (Zotero && Zotero.initialURL) {