diff options
author | Veit Lehmann <[email protected]> | 2013-06-09 02:02:14 +0300 |
---|---|---|
committer | Veit Lehmann <[email protected]> | 2013-06-09 02:02:14 +0300 |
commit | 5313ae17e4f270053bd7d55c45baa18fe05fa75b (patch) | |
tree | f0a333ff5c1238d727a307cc9e6a9ff1b65e77f0 /js/viewfeed.js | |
parent | 496195db4e59e1a2a59ca190450a3b140e44f4a7 (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/viewfeed.js')
-rw-r--r-- | js/viewfeed.js | 7 |
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) |