Merge pull request #218 from levito/patch-2
only update floatingTitle innerHTML if active article changes
This commit is contained in:
commit
0a561a4371
1 changed files with 4 additions and 3 deletions
|
@ -2208,9 +2208,10 @@ function updateFloatingTitle() {
|
||||||
|
|
||||||
var header = child.getElementsByClassName("cdmHeader")[0];
|
var header = child.getElementsByClassName("cdmHeader")[0];
|
||||||
|
|
||||||
$("floatingTitle").setAttribute("rowid", child.id);
|
if (child.id != $("floatingTitle").getAttribute("rowid")) {
|
||||||
$("floatingTitle").innerHTML =
|
$("floatingTitle").setAttribute("rowid", child.id);
|
||||||
header.innerHTML;
|
$("floatingTitle").innerHTML = header.innerHTML;
|
||||||
|
}
|
||||||
|
|
||||||
if (child.offsetTop < hf.scrollTop - header.offsetHeight - 100 &&
|
if (child.offsetTop < hf.scrollTop - header.offsetHeight - 100 &&
|
||||||
child.offsetTop + child.offsetHeight - hf.scrollTop > 100)
|
child.offsetTop + child.offsetHeight - hf.scrollTop > 100)
|
||||||
|
|
Loading…
Reference in a new issue