-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnblockURLinWeChat.js脚本在小火箭上遇到的问题 #48
Comments
已修改,我没有 Shadowrocket 及 Stash,烦请测试,谢谢! |
以下是刚刚测试的日志,我注意到$environment.system依然在😂 Can't find variable: $environment in method global code@ line: 16, column: 49 |
佬,帮忙改一下吧,😫, |
很抱歉,没有 Shadowrocket,无法进行进一步测试。如果真的有此报错,大概率是 Shadowrocket 自身问题。node 和浏览器的 JavaScript 控制台也没有 $environment 接口,这次的写法和之前的写法均不会引起报错。 你说的问题可以直接通过: const isQuanX = typeof $notify != "undefined";
const isSurgeiOS1 =
typeof $utils != "undefined" &&
$environment["surge-version"] &&
$environment.system == "iOS";
const isSurgeiOS2 =
"undefined" !== typeof $environment &&
$environment["surge-version"] &&
$environment.system == "iOS";
const isLooniOS = typeof $loon != "undefined" && /iPhone/.test($loon);
const isStashiOS =
"undefined" !== typeof $environment &&
$environment["stash-version"] &&
$environment.system == "iOS";
const isShadowrocket = "undefined" !== typeof $rocket;
const isLanceX = "undefined" != typeof $native;
const platform = {isQuanX, isSurgeiOS1, isSurgeiOS2, isLooniOS, isStashiOS, isShadowrocket, isLanceX}
console.log(JSON.stringify(platform))
$done() 进行测试,其中 |
刚刚测试了最新的Unblock脚本 小火箭已经可以使用了。谢谢大佬解答 |
1、第17行 因为小火箭没有$environment接口,$environment.system 会导致小火箭报错, 可否换一种方式识别Surge iOS端
2、小火箭通知格式与Surge不同
小火箭是$notification.post(title, subtitle, body, url)
Surge是$notification.post(title, subtitle, body, {url:url})
以上,麻烦大佬为兼容小火箭费心。
The text was updated successfully, but these errors were encountered: