summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Friend <nathan@gitlab.com>2019-06-28 16:27:47 -0300
committerNathan Friend <nathan@gitlab.com>2019-06-28 16:27:47 -0300
commit36e73eff4e6a56ff7e3b1c078f42ae664754eaa7 (patch)
treef7f412294cfffaf39b9ad914f6d03edb2681eb9d
parentbe83c8eae0f9ca46c7ab08ba4f293935430932f0 (diff)
downloadgitlab-ce-36e73eff4e6a56ff7e3b1c078f42ae664754eaa7.tar.gz
Allow (Haml) tooltip delay customization via localStoragenfriend-make-haml-tooltip-delay-user-configurable
-rw-r--r--app/assets/javascripts/main.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js
index 9f30a989295..2d32e6a7fbb 100644
--- a/app/assets/javascripts/main.js
+++ b/app/assets/javascripts/main.js
@@ -119,11 +119,15 @@ function deferredInitialisation() {
.catch(() => {});
}
+ const glTooltipDelay = localStorage.getItem('gl-tooltip-delay');
+ const delay = glTooltipDelay ? JSON.parse(glTooltipDelay) : 0;
+
// Initialize tooltips
$body.tooltip({
selector: '.has-tooltip, [data-toggle="tooltip"]',
trigger: 'hover',
boundary: 'viewport',
+ delay,
});
// Initialize popovers