From: Andrew Dolgov Date: Thu, 21 Mar 2013 06:34:36 +0000 (+0400) Subject: experimental: limit initialized html content for expanded cdm X-Git-Tag: 1.7.5~57 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b74c51342896f4f01a742dcad82fc8afa753c036;p=tt-rss.git experimental: limit initialized html content for expanded cdm --- diff --git a/classes/feeds.php b/classes/feeds.php index caf22322..79aaa8e5 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -624,14 +624,14 @@ class Feeds extends Handler_Protected { $reply['content'] .= ""; - if (!$expand_cdm) { - $reply['content'] .= ""; +// if (!$expand_cdm) { + $reply['content'] .= ""; $reply['content'] .= htmlspecialchars($line["content"]); $reply['content'] .= " div[id*=RROW]").each( + function(child) { + if (child.offsetTop <= $("headlines-frame").scrollTop + + $("headlines-frame").offsetHeight) { + + var cencw = $("CENCW-" + child.id.replace("RROW-", "")); + + if (cencw) { + cencw.innerHTML = htmlspecialchars_decode(cencw.innerHTML); + cencw.setAttribute('id', ''); + Element.show(cencw); + } + } + } + ); + + if (!_infscroll_disable) { if ((hsp && e.scrollTop + e.offsetHeight >= hsp.offsetTop - hsp.offsetHeight) || (e.scrollHeight != 0 && @@ -1197,7 +1216,7 @@ function headlines_scroll_handler(e) { $$("#headlines-frame > div[id*=RROW][class*=Unread]").each( function(child) { - if ($("headlines-frame").scrollTop > + if (child.hasClassName("Unread") && $("headlines-frame").scrollTop > (child.offsetTop + child.offsetHeight/2)) { var id = child.id.replace("RROW-", ""); @@ -1388,6 +1407,7 @@ function cdmExpandArticle(id) { if (cencw) { cencw.innerHTML = htmlspecialchars_decode(cencw.innerHTML); cencw.setAttribute('id', ''); + Element.show(cencw); } Element.show(elem);