mirror of
https://github.com/foxhui/WebAI2API.git
synced 2026-06-16 21:03:59 +08:00
feat: 增快鼠标移动速度 (ref #13)
This commit is contained in:
@@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- **Token 留空问题**
|
||||
- 修复 WebUI 留空Token后无法重启的问题(允许 Token 留空)
|
||||
|
||||
### 🔄 Changed
|
||||
- **鼠标轨迹**
|
||||
- 增快鼠标移动速度
|
||||
|
||||
### ❌ Removed
|
||||
- **热门模型ID**
|
||||
- 竞技场删除了 gemini-3-pro-image-preview-2k,因此项目同步删除
|
||||
|
||||
@@ -270,7 +270,8 @@ export async function safeClick(page, target, options = {}) {
|
||||
if (box) {
|
||||
const { x, y } = getHumanClickPoint(box, options.bias || 'random');
|
||||
logger.debug('浏览器', `[safeClick] 移动鼠标到 (${x.toFixed(0)}, ${y.toFixed(0)})...`);
|
||||
await page.cursor.moveTo({ x, y });
|
||||
const cursorSpeed = options.cursorSpeed ?? 40;
|
||||
await page.cursor.moveTo({ x, y }, { moveSpeed: cursorSpeed });
|
||||
logger.debug('浏览器', `[safeClick] 执行点击...`);
|
||||
await page.mouse.click(x, y, { clickCount });
|
||||
return;
|
||||
|
||||
@@ -108,7 +108,7 @@ export async function gotoWithCheck(page, url, options = {}) {
|
||||
const { timeout = TIMEOUTS.NAVIGATION } = options;
|
||||
try {
|
||||
const response = await page.goto(url, {
|
||||
waitUntil: 'domcontentloaded',
|
||||
waitUntil: 'load',
|
||||
timeout
|
||||
});
|
||||
if (!response) {
|
||||
|
||||
Reference in New Issue
Block a user