mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 21:25:55 +00:00
make floating title less cpu intensive
This commit is contained in:
@@ -2216,13 +2216,9 @@ function openSelectedAttachment(elem) {
|
||||
function updateFloatingTitle() {
|
||||
try {
|
||||
var hf = $("headlines-frame");
|
||||
var child = $("RROW-" + _active_article_id);
|
||||
|
||||
var elems = $$("#headlines-frame > div[id*=RROW]");
|
||||
|
||||
for (var i = 0; i < elems.length; i++) {
|
||||
var child = elems[i];
|
||||
|
||||
if (child.offsetTop + child.offsetHeight > hf.scrollTop) {
|
||||
if (child && child.offsetTop + child.offsetHeight > hf.scrollTop) {
|
||||
|
||||
var header = child.getElementsByClassName("cdmHeader")[0];
|
||||
|
||||
@@ -2236,10 +2232,8 @@ function updateFloatingTitle() {
|
||||
Element.show("floatingTitle");
|
||||
else
|
||||
Element.hide("floatingTitle");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
exception_error("updateFloatingTitle", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user