summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorVeit Lehmann <[email protected]>2013-06-09 02:02:14 +0300
committerVeit Lehmann <[email protected]>2013-06-09 02:02:14 +0300
commit5313ae17e4f270053bd7d55c45baa18fe05fa75b (patch)
treef0a333ff5c1238d727a307cc9e6a9ff1b65e77f0 /js
parent496195db4e59e1a2a59ca190450a3b140e44f4a7 (diff)
only update floatingTitle innerHTML if active article changes
This will boost scrolling performance pretty much and avoid flickering of floatingTitle
Diffstat (limited to 'js')
-rw-r--r--js/viewfeed.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/viewfeed.js b/js/viewfeed.js
index c20c5a39b..b7e321d73 100644
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -2208,9 +2208,10 @@ function updateFloatingTitle() {
var header = child.getElementsByClassName("cdmHeader")[0];
- $("floatingTitle").setAttribute("rowid", child.id);
- $("floatingTitle").innerHTML =
- header.innerHTML;
+ if (child.id != $("floatingTitle").getAttribute("rowid")) {
+ $("floatingTitle").setAttribute("rowid", child.id);
+ $("floatingTitle").innerHTML = header.innerHTML;
+ }
if (child.offsetTop < hf.scrollTop - header.offsetHeight - 100 &&
child.offsetTop + child.offsetHeight - hf.scrollTop > 100)