Selaa lähdekoodia

!2 fix currentUrl

chenliangyu 4 kuukautta sitten
vanhempi
sitoutus
300e1d9b7d
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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 {