From f941735aa06d5145429385c0c82a35c6654c53eb Mon Sep 17 00:00:00 2001 From: fendly2 Date: Tue, 30 Jun 2026 22:46:32 +0800 Subject: [PATCH] Refactor: allow concurrent translation and chat tasks by avoiding abort on tab switch --- popup.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/popup.js b/popup.js index 01cdb4e..671c506 100644 --- a/popup.js +++ b/popup.js @@ -437,14 +437,7 @@ document.addEventListener('DOMContentLoaded', () => { const currentActiveTabId = currentActiveTabButton ? currentActiveTabButton.dataset.tab : null; const targetTabId = button.dataset.tab; - if (currentActiveTabId === 'translate' && targetTabId !== 'translate' - && isMainOperationInProgress && currentMainOperationAbortController) { - currentMainOperationAbortController.abort(); - } - if (currentActiveTabId === 'chat' && targetTabId !== 'chat' - && isChatSending && currentChatAbortController) { - currentChatAbortController.abort(); - } + document.querySelectorAll('.tab-nav__btn').forEach(btn => { btn.classList.remove('is-active');