Repository navigation
Expand file tree
/
Copy pathAlohaVIP.js
More file actions
68 lines (58 loc) · 2.43 KB
/
Copy pathAlohaVIP.js
File metadata and controls
68 lines (58 loc) · 2.43 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
#!name=Aloha ✨
#!desc=Web Browsing - Module
#!category=🔐APP
#!author=🅚Ⓐ🅦Ⓞ🅐Ⓣ
#!icon=https://raw.githubusercontent.com/Mikephie/icons/main/icon/aloha.png
𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹𒊹
[rewrite_local]
^https:\/\/api\.alohaprofile\.com\/v1\/profile_info url script-response-body https://raw.githubusercontent.com/KawOat9/Scripts/main/AlohaVIP.js
[MITM]
hostname = api.alohaprofile.com
*/
// ===== 轻量通知 + 冷却 =====
//const APP_NAME = "✨ Aloha ✨"; // ← 只改这个显示名
//const ID = "aloha"; // ← 对应键名,保持纯字母数字(无 emoji)
//const EN = "n:"+ID+":e"; // 开关
//const TS = "n:"+ID+":t"; // 时间戳
//const CD = 600000; // 冷却时长:10 分钟(毫秒)
// ---- 通知函数(兼容 QX / Surge / Loon)----
//function notify(t,s,b){
// if (typeof $notify==="function") $notify(t,s,b);
// else if ($notification?.post) $notification.post(t,s,b);
// else console.log("[Notify]", t, s, b);
//}
// ---- 判定逻辑 ----
//let enabled = (($persistentStore.read(EN) || "1") === "1");
//if (enabled) {
// let now = Date.now();
// let last = parseInt($persistentStore.read(TS) || "0",10) || 0;
// if (last===0 || now-last>CD) {
// notify(APP_NAME,"✅ปลดล็อคสมาชิก, 🕝พรีเมียมจนถึง 08-08-2088🌟");
// $persistentStore.write(String(now), TS);
// }
//}
// 主脚本函数...
// -------- 通知(带冷却)逻辑开始 --------
const cooldownMs = 10 * 60 * 1000;
const notifyKey = "Aloha_notify_key";
const now = Date.now();
let lastNotifyTime = $persistentStore.read(notifyKey) ? parseInt($persistentStore.read(notifyKey)) : 0;
if (now - lastNotifyTime > cooldownMs) {
$notification.post("ᯓ★ Aloha Premium ×̷̷͜×̷", "ᶠᶸᶜᵏᵧₒᵤ!", "ปลดล็อคถาวร ⓪️⑧️ - ⓪️⑧️ - ②️⓪️⑧️⑧️");
$persistentStore.write(now.toString(), notifyKey);
}
// -------- 通知(带冷却)逻辑结束 --------
let body = $response.body;
if (!body) { $done({}); }
body = JSON.parse(body);
if (body?.profile) {
Object.assign(body.profile, {
is_premium: true,
end_of_premium: 3742762088,
email: "KawOat.DEV@gmail.com",
_end_of_premium: "2088-08-08 08:08:08.000"
});
}
$done({ body: JSON.stringify(body) });
// 主脚本函数...