From b9cb7f75b973341aa09986ec0c56cdd99f2e5323 Mon Sep 17 00:00:00 2001 From: cmliu Date: Fri, 26 Dec 2025 00:23:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E5=9F=9F=E5=90=8D=E5=87=BD=E6=95=B0=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E9=9A=8F=E6=9C=BA=E4=B8=BB=E6=9C=BA=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_worker.js b/_worker.js index 79fb861..d7011b7 100644 --- a/_worker.js +++ b/_worker.js @@ -900,7 +900,7 @@ function 批量替换域名(内容, hosts, 每组数量 = 2) { const 打乱后数组 = [...hosts].sort(() => Math.random() - 0.5); let count = 0, currentRandomHost = null; return 内容.replace(/example\.com/g, () => { - if (count % 每组数量 === 0) currentRandomHost = 随机替换通配符(打乱后数组[count % 打乱后数组.length]); + if (count % 每组数量 === 0) currentRandomHost = 随机替换通配符(打乱后数组[Math.floor(count / 每组数量) % 打乱后数组.length]); count++; return currentRandomHost; });