show tooltips in popup on ellipsized names

This commit is contained in:
tophf 2017-11-26 15:31:00 +03:00
parent af64ec4ac0
commit b63449f299

View File

@ -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;