This commit is contained in:
2026-04-02 21:02:16 +08:00
commit 75b01d3e58
56 changed files with 3714 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
/**
* Surge 脚本Clear_ApprovalCartId.js
* 作用:监测到 Family Safety 的 Complete 请求时,自动清空 ApprovalCartId
*/
const STORE_KEY = "ApprovalCartId";
(function() {
// 只有 POST 方法才触发清理
if ($request.method === "POST") {
const oldValue = $persistentStore.read(STORE_KEY);
if (oldValue) {
$persistentStore.write("", STORE_KEY);
console.log("🧹 [Batch Approve] 购买流程结束,已自动清空 ApprovalCartId 缓存。");
$notification.post("Microsoft Family", "购买流程结束", "ApprovalCartId 缓存已清空");
}
}
$done({});
})();