commit cefab23888fe494e3584b8e557f2a653ed6b5100 parent 5bfc1e419917eeaf5174bd7d0ece4d3c68e8511f Author: Dan Stillman <dstillman@zotero.org> Date: Mon, 10 Nov 2014 18:06:17 -0500 Add tooltip to Zotero toolbar button Diffstat:
| M | chrome/content/zotero/overlay.js | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git 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); }