From 55c90dd8f7aa54d3bc7cafff7b98f60b33180fb5 Mon Sep 17 00:00:00 2001 From: QLHazyCoder <2825305047@qq.com> Date: Sun, 12 Apr 2026 22:00:49 +0800 Subject: [PATCH] fix(step8): stop debugger click cleanly --- background.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/background.js b/background.js index f1adbdb..7ad4bad 100644 --- a/background.js +++ b/background.js @@ -2211,6 +2211,7 @@ async function humanStepDelay(min = HUMAN_STEP_DELAY_MIN, max = HUMAN_STEP_DELAY } async function clickWithDebugger(tabId, rect) { + throwIfStopped(); if (!tabId) { throw new Error('未找到用于调试点击的认证页面标签页。'); } @@ -2229,10 +2230,12 @@ async function clickWithDebugger(tabId, rect) { } try { + throwIfStopped(); const x = Math.round(rect.centerX); const y = Math.round(rect.centerY); await chrome.debugger.sendCommand(target, 'Page.bringToFront'); + throwIfStopped(); await chrome.debugger.sendCommand(target, 'Input.dispatchMouseEvent', { type: 'mouseMoved', x, @@ -2241,6 +2244,7 @@ async function clickWithDebugger(tabId, rect) { buttons: 0, clickCount: 0, }); + throwIfStopped(); await chrome.debugger.sendCommand(target, 'Input.dispatchMouseEvent', { type: 'mousePressed', x, @@ -2249,6 +2253,7 @@ async function clickWithDebugger(tabId, rect) { buttons: 1, clickCount: 1, }); + throwIfStopped(); await chrome.debugger.sendCommand(target, 'Input.dispatchMouseEvent', { type: 'mouseReleased', x,