1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 19:35:55 +00:00

add experimental clientside headline clamping (refs #479)

This commit is contained in:
Andrew Dolgov
2012-08-09 13:08:07 +04:00
parent 18e8dc12d9
commit 26e4b12466
3 changed files with 27 additions and 4 deletions

View File

@@ -1718,3 +1718,12 @@ function get_radio_checked(radioObj) {
}
return("");
}
function clamp_element(elem, height) {
if (elem && elem.offsetHeight > height) {
while (elem.offsetHeight > height)
elem.innerHTML = cp.innerHTML.substring(0, elem.innerHTML.length - 50);
elem.innerHTML += "…";
}
}