mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 01:05:56 +00:00
make floating title less cpu intensive
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user