forked from ihaoljy/Rewrite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Light.js
45 lines (33 loc) · 1.42 KB
/
Light.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*************************************
项目名称:Light壁纸
软件版本:1.27
下载地址:https://is.gd/Rhui0O
使用声明:⚠️仅供参考,🈲️转载与售卖!
**************************************
[rewrite_local]
^https?:\/\/api\.revenuecat\.com\/v1\/(subscribers\/[^\/]+$|receipts$) url script-response-body https://raw.githubusercontent.com/Yu9191/Rewrite/main/Light.js
[mitm]
hostname = api.revenuecat.com
************************************/
const anni = {};
const anni1 = JSON.parse(typeof $response != "undefined" && $response.body || null);
if (typeof $response == "undefined") {
delete $request.headers["x-revenuecat-etag"];
delete $request.headers["X-RevenueCat-ETag"];
anni.headers = $request.headers;
} else if (anni1 && anni1.subscriber) {
anni1.subscriber.subscriptions = anni1.subscriber.subscriptions || {};
anni1.subscriber.entitlements = anni1.subscriber.entitlements || {};
const data = {
"expires_date": "2099-12-31T12:00:00Z",
"original_purchase_date": "2022-11-18T03:57:16Z",
"purchase_date": "2022-06-15T12:00:00Z",
"ownership_type": "PURCHASED",
"store": "app_store"
};
anni1.subscriber.subscriptions["com.miiiao.premium"] = data;
anni1.subscriber.entitlements["premium_rc"] = JSON.parse(JSON.stringify(data));
anni1.subscriber.entitlements["premium_rc"].product_identifier = "com.miiiao.premium";
anni.body = JSON.stringify(anni1);
}
$done(anni);