This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (async () => { | |
| const SCROLL_STEP = 300; // 每次滚动像素 | |
| const SCROLL_INTERVAL = 800; // 滚动间隔(ms) | |
| const IDLE_WAIT = 3000; // 到底后等待加载时间(ms) | |
| const MAX_IDLE_RETRIES = 5; // 最大等待加载重试次数 | |
| const sleep = ms => new Promise(r => setTimeout(r, ms)); | |
| let idleCount = 0; | |
| let lastHeight = 0; |
OlderNewer