From b9bba76b4ef773a515977dac7db6502e16e6d5d6 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 20 Jul 2017 17:08:11 +0200 Subject: [PATCH] Make the delay for tooltips configurable --- www/common/common-interface.js | 4 +++- www/common/cryptpad-common.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 43c07123b..90deec779 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -299,11 +299,13 @@ define([ var MutationObserver = window.MutationObserver; var addTippy = function (el) { if (el.nodeName === 'IFRAME') { return; } + var delay = typeof(AppConfig.tooltipDelay) === "number" ? AppConfig.tooltipDelay : 500; + if (el.nodeName === 'A') { d.push(el); } Tippy(el, { position: 'bottom', distance: 0, performance: true, - delay: [500, 0] + delay: [delay, 0] }); }; var $body = $('body'); diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 101695ef8..5b7e5a15a 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1779,6 +1779,7 @@ define([ initialized = true; updateLocalVersion(); + common.addTooltips(); f(void 0, env); if (typeof(window.onhashchange) === 'function') { window.onhashchange(); } } @@ -1797,7 +1798,6 @@ define([ store = common.store = env.store = storeObj; common.addDirectMessageHandler(common); - common.addTooltips(); var proxy = getProxy(); var network = getNetwork();