tab-reloader icon indicating copy to clipboard operation
tab-reloader copied to clipboard

Scroll to the end after reload: does not work correctly

Open LordMerlin opened this issue 4 years ago • 0 comments

When you enable this option in the settings, after refreshing the page by timeout, the page immediately moves down, without scrolling. Is that what you intended?

I have to use the following script


var height = 10;
var attempt = 4;
var intS = 0;
function scrollToEndPage() {
console.log("hight:" + height + " scrollHeight:" + document.body.scrollHeight + " att:" + attempt  );

if (height < document.body.scrollHeight)
{
    //height = document.body.scrollHeight;
    window.scrollTo(0, height);
    attempt++;
    height = parseInt(height) + attempt;
}
esle
{
    clearInterval(intS);
}
}
setTimeout(() => { intS = setInterval(scrollToEndPage,1500); }, 5000);

But the script is also a problem. After restarting the browser, the script is lost. If the autoscrolling was intended to work, then at least you can leave the last script?

LordMerlin avatar Aug 27 '20 09:08 LordMerlin