diff --git a/package.json b/package.json index 3c946cf..d5d349b 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,8 @@ }, "scripts": { "release": "npm run minify && node build.js", - "minify": "uglifyjs wuhu-torn-helper.js -o release.min.user.js -m" + "minify": "uglifyjs wuhu-torn-helper.js -o release.min.user.js -m", + "serve": "", + "build": "" } } diff --git a/wuhu-torn-helper.js b/wuhu-torn-helper.js index 5b456b4..5c90431 100644 --- a/wuhu-torn-helper.js +++ b/wuhu-torn-helper.js @@ -10265,9 +10265,14 @@ z-index:100001; }); }); }; - WHNotify(await backHomeAction()); - WHNotify('成功,即将刷新页面……'); - setTimeout(location.reload, 3000); + let res = await backHomeAction(); + WHNotify(res); + if (!res.includes('error')) { + WHNotify('成功,即将刷新'); + setTimeout(() => location.reload(), 3000); + } else { + WHNotify('出错了'); + } } $zhongNode.initTimer.innerHTML = `助手加载时间 ${Date.now() - start_timestamp}ms`;