mirror of
https://github.com/primedigitaltech/azon_seeker.git
synced 2026-10-05 07:13:06 +08:00
perf: reduce Amazon lazy-load scroll stops
This commit is contained in:
parent
832ae83443
commit
72b0c348a9
@ -48,7 +48,7 @@ export async function waitForAmazonSearchPageReady() {
|
|||||||
|
|
||||||
// Visit the full result stream instead of jumping straight to pagination. Amazon loads
|
// Visit the full result stream instead of jumping straight to pagination. Amazon loads
|
||||||
// recommendation and sponsored modules when their region approaches the viewport.
|
// recommendation and sponsored modules when their region approaches the viewport.
|
||||||
for (const fraction of [0.15, 0.35, 0.55, 0.75, 0.92]) {
|
for (const fraction of [0.2, 0.55, 0.92]) {
|
||||||
const documentHeight = Math.max(
|
const documentHeight = Math.max(
|
||||||
document.documentElement.scrollHeight,
|
document.documentElement.scrollHeight,
|
||||||
document.body?.scrollHeight || 0,
|
document.body?.scrollHeight || 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user