Update SyncXboxCloud.js

This commit is contained in:
XXhaos
2026-04-03 10:09:51 +08:00
committed by GitHub
parent 56f6fd44fa
commit fb4a8ce105

View File

@@ -7,15 +7,6 @@
const readUrl = 'https://cc.dragonisheep.com/surge?token=xbox123';
const clearUrl = 'https://cc.dragonisheep.com/surge?token=xbox123&action=clear';
const storeKey = 'XboxProductList';
const lockKey = 'SyncXboxLock';
// ★ 防重入5 秒内若已执行过,直接放行不处理
// Surge 规则会同时拦截 read 和 clear 两个请求,第二次触发在此被阻断
const lockVal = $persistentStore.read(lockKey);
if (lockVal && Date.now() - parseInt(lockVal, 10) < 5000) {
$done({});
}
$persistentStore.write(String(Date.now()), lockKey);
function escapeHTML(str) {
return String(str || '')