From cefab23888fe494e3584b8e557f2a653ed6b5100 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 10 Nov 2014 18:06:17 -0500 Subject: [PATCH] Add tooltip to Zotero toolbar button --- chrome/content/zotero/overlay.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index 073dac7083..f9aa287f99 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -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); }