Don't try to icon guidance on initialization failure
This commit is contained in:
parent
6c74d670d1
commit
5814bdcd84
1 changed files with 14 additions and 14 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue