Add tooltip to Zotero toolbar button

This commit is contained in:
Dan Stillman 2014-11-10 18:06:17 -05:00
parent 5bfc1e4199
commit cefab23888

View file

@ -97,6 +97,17 @@ var ZoteroOverlay = new function()
if (Zotero && Zotero.initialized){
document.getElementById('appcontent').addEventListener('mousemove', Zotero.ProgressWindowSet.updateTimers, false);
if (icon) {
// TODO: move to strings
let str = 'Zotero';
let key = Zotero.Keys.getKeyForCommand('openZotero');
if (key) {
str += ' ('
+ (Zotero.isMac ? '⇧⌘' : Zotero.getString('general.keys.ctrlShift'))
+ key
+ ')';
}
icon.setAttribute('tooltiptext', str);
if (iconPref == 1) {
icon.setAttribute('compact', true);
}