From dff579b78de869ebbd419b35c8404413ad8dec06 Mon Sep 17 00:00:00 2001 From: QLHazyCoder <2825305047@qq.com> Date: Mon, 11 May 2026 18:10:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E4=BF=83=E9=94=80=E7=9B=B8=E5=85=B3=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=92=8C=E6=9B=B4=E6=96=B0=20UI=20=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sidepanel/ip-proxy-panel.js | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/sidepanel/ip-proxy-panel.js b/sidepanel/ip-proxy-panel.js index 5df2498..c18a4c8 100644 --- a/sidepanel/ip-proxy-panel.js +++ b/sidepanel/ip-proxy-panel.js @@ -1252,35 +1252,6 @@ function setIpProxyEnabledInlineStatus(state = {}, enabled = getSelectedIpProxyE } } -function updateIpProxyPromoOverflow() { - if ( - typeof ipProxyPromo === 'undefined' - || typeof ipProxyPromoText === 'undefined' - || !ipProxyPromo - || !ipProxyPromoText - ) { - return; - } - if (!ipProxyPromo.getClientRects().length) { - ipProxyPromo.classList.remove('is-overflowing'); - return; - } - const overflowing = ipProxyPromoText.scrollWidth > Math.max(0, ipProxyPromo.clientWidth - 2); - ipProxyPromo.classList.toggle('is-overflowing', overflowing); -} - -function scheduleIpProxyPromoOverflowCheck() { - if (typeof globalThis.requestAnimationFrame === 'function') { - globalThis.requestAnimationFrame(updateIpProxyPromoOverflow); - return; - } - globalThis.setTimeout(updateIpProxyPromoOverflow, 0); -} - -if (typeof globalThis.addEventListener === 'function') { - globalThis.addEventListener('resize', scheduleIpProxyPromoOverflowCheck); -} - function updateIpProxyUI(state = latestState) { const enabled = getSelectedIpProxyEnabled(); const showSettings = enabled && ipProxySectionExpanded; @@ -1312,9 +1283,6 @@ function updateIpProxyUI(state = latestState) { if (rowIpProxyFold) { rowIpProxyFold.style.display = showSettings ? '' : 'none'; } - if (rowIpProxyPromo) { - rowIpProxyPromo.style.display = showSettings ? '' : 'none'; - } if (rowIpProxyService) { rowIpProxyService.style.display = showSettings ? '' : 'none'; } @@ -1377,7 +1345,6 @@ function updateIpProxyUI(state = latestState) { if (ipProxyLayout) { ipProxyLayout.classList.toggle('is-account-only', !apiModeAvailable); } - scheduleIpProxyPromoOverflowCheck(); if (selectIpProxyService) { selectIpProxyService.value = service; selectIpProxyService.disabled = true;