1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-14 03:35:56 +00:00

make floating title less cpu intensive

This commit is contained in:
Andrew Dolgov
2013-06-25 01:35:07 +04:00
parent b627f574f8
commit d1343b844d

View File

@@ -2216,13 +2216,9 @@ function openSelectedAttachment(elem) {
function updateFloatingTitle() { function updateFloatingTitle() {
try { try {
var hf = $("headlines-frame"); var hf = $("headlines-frame");
var child = $("RROW-" + _active_article_id);
var elems = $$("#headlines-frame > div[id*=RROW]"); if (child && child.offsetTop + child.offsetHeight > hf.scrollTop) {
for (var i = 0; i < elems.length; i++) {
var child = elems[i];
if (child.offsetTop + child.offsetHeight > hf.scrollTop) {
var header = child.getElementsByClassName("cdmHeader")[0]; var header = child.getElementsByClassName("cdmHeader")[0];
@@ -2236,10 +2232,8 @@ function updateFloatingTitle() {
Element.show("floatingTitle"); Element.show("floatingTitle");
else else
Element.hide("floatingTitle"); Element.hide("floatingTitle");
}
break;
}
}
} catch (e) { } catch (e) {
exception_error("updateFloatingTitle", e); exception_error("updateFloatingTitle", e);
} }