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:
@@ -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 += "…";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user