|
@@ -138,7 +138,7 @@ class Webshot extends CallableInstance<[Tweets, (...args) => void, number], Prom
|
|
|
logger.warn(`navigation timed out at ${getTimerTime()} seconds`);
|
|
|
return null;
|
|
|
})
|
|
|
- // scroll to last tweet by owner in thread, if any, or top of thread
|
|
|
+ // scroll to last tweet by owner in thread, if any, or top of thread
|
|
|
.then((handle: puppeteer.ElementHandle<HTMLDivElement>) => {
|
|
|
if (handle === null) throw new puppeteer.errors.TimeoutError();
|
|
|
return handle.evaluate(div => {
|
|
@@ -150,6 +150,7 @@ class Webshot extends CallableInstance<[Tweets, (...args) => void, number], Prom
|
|
|
if (getProfileUrl() !== ownerProfileUrl) continue;
|
|
|
return document.documentElement.scrollTop = window.scrollY + div.getBoundingClientRect().top;
|
|
|
}
|
|
|
+ document.documentElement.scrollTop = 0;
|
|
|
});
|
|
|
})
|
|
|
.then(() => page.evaluate(() => {
|