forked from photonmang/quantumultX
-
Notifications
You must be signed in to change notification settings - Fork 6
/
wnsm.js
28 lines (22 loc) · 860 Bytes
/
wnsm.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
#蜗牛睡眠 全功能解锁VIP&付费音乐
^https:\/\/(snailsleep\.net\/|(music|community)\.snailsleep\.net\/)(snail\/v1\/profile\/get|snail-music\/music\/(sleeping|meditation)\/single\/list) url script-response-body wnsm1.js
MITM = snailsleep.net,music.snailsleep.net,community.snailsleep.net
*/
re('"expires":\\d+@"expired":\\w+@"vip":\\w+@"vipNeedPay":\\w+@"needPay":\\w+','"expires":4079147492000@"expired":false@"vip":true@"vipNeedPay":false@"needPay":false')
function re() {
var body = $response.body;
if (arguments[0].includes("@")) {
var regs = arguments[0].split("@");
var strs = arguments[1].split("@");
for (i = 0;i < regs.length;i++) {
var reg = new RegExp(regs[i],"g");
body = body.replace(reg, strs[i]);
}
}
else {
var reg = new RegExp(arguments[0],"g");
body = body.replace(reg, arguments[1]);
}
$done(body);
}