Don't try to icon guidance on initialization failure
This commit is contained in:
parent
6c74d670d1
commit
5814bdcd84
|
@ -110,6 +110,20 @@ var ZoteroOverlay = new function()
|
||||||
document.persist(toolbar.id, "currentset");
|
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 {
|
else {
|
||||||
|
@ -135,20 +149,6 @@ var ZoteroOverlay = new function()
|
||||||
icon.setAttribute('error', 'true');
|
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
|
// Used for loading pages from upgrade wizard
|
||||||
if (Zotero && Zotero.initialURL) {
|
if (Zotero && Zotero.initialURL) {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user