From b63449f299646f8fca76dc5417455bc764608c82 Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 26 Nov 2017 15:31:00 +0300 Subject: [PATCH] show tooltips in popup on ellipsized names --- popup/popup.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/popup/popup.js b/popup/popup.js index 7be2220b..3d157327 100644 --- a/popup/popup.js +++ b/popup/popup.js @@ -1,4 +1,3 @@ -/* global retranslateCSS */ 'use strict'; let installed; @@ -267,6 +266,11 @@ function createStyleElement({ }); styleName.checkbox = checkbox; styleName.appendChild(document.createTextNode(style.name)); + setTimeout((el = styleName) => { + if (el.scrollWidth > el.clientWidth + 1) { + el.title = el.textContent; + } + }); $('.enable', entry).onclick = handleEvent.toggle; $('.disable', entry).onclick = handleEvent.toggle;