修改参数逻辑 (#2696)

* 修改参数逻辑

* 修改逻辑,添加数字过滤
This commit is contained in:
古又
2026-01-16 22:12:52 +08:00
committed by GitHub
parent e95c7534e5
commit b2de82dbf5
4 changed files with 7 additions and 6 deletions

View File

@@ -21,7 +21,7 @@
"启动bat脚本"[参数为bat脚本路径Ps【E:\ABGI\重启.bat】]
"联机更换ABGI的账号信息"[参数为uid-namePs【1*******-原神大王】]
"更换联机房间"[参数为:房间名字+vip密钥Ps:【古叉别断网-GUYOUSHIGEHAOREN】]
"等待时间"
"等待时间"[参数为多少秒Ps:【5000】]
------

View File

@@ -1,5 +1,5 @@
// 延时时间
const outTime= ~~settings.outTime;
const outTime= ~~String(settings.outTime).replace(/\D/g, "");
// 比较结果
let result = 0
@@ -125,8 +125,9 @@ async function compareVersion(version1, version2) {
log.info(`ABGI启动更换房间`+`${settings.inputText}`);
await sleep(outTime);
return;
case "等待时间(单位为ms)":
await sleep(500);
case "等待时间(单位为)":
const pureDigitStr = String(settings.inputText).replace(/\D/g, "");
await sleep(pureDigitStr*1000);
await sleep(outTime);
return;
default:

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "老王妙妙屋",
"version": "0.8",
"version": "0.9",
"tags": [
"abgi"
],

View File

@@ -21,7 +21,7 @@
"bat脚本",
"联机更换ABGI的账号信息",
"更换联机房间",
"等待时间(单位为ms)"
"等待时间(单位为)"
],
"default": ""
},