소스 검색

!2 fix currentUrl

chenliangyu 4 달 전
부모
커밋
300e1d9b7d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      addin/res/VTMModifyHeaders/background.js

+ 1 - 1
addin/res/VTMModifyHeaders/background.js

@@ -252,7 +252,7 @@ function getCurrentTabUrlWithRetry(maxRetries = 40, retryDelay = 50) {
     chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
         if (tabs[0] && tabs[0].url && tabs[0].url.length > 0) {
             // 成功获取有效 URL
-            const currentUrl = tabs[0].url;
+            currentUrl = tabs[0].url;
             console.log("当前 URL:", currentUrl);
             handleUrlLogic(currentUrl, tabs); // 处理你的业务逻辑
         } else {