From 679cf7f368d01f4d2bd81b70c9c4474f11ab1026 Mon Sep 17 00:00:00 2001 From: deploy Date: Sat, 7 Nov 2026 03:05:19 +0000 Subject: [PATCH] =?UTF-8?q?=E6=82=84=E6=82=84=E8=AF=9D=EF=BC=9A=E5=8F=98?= =?UTF-8?q?=E6=98=9F=E7=89=B9=E6=95=88=E7=AD=89=E6=98=9F=E7=A9=BA=E7=94=BB?= =?UTF-8?q?=E5=A5=BD=E5=86=8D=E6=94=BE=EF=BC=8C=E6=94=BE=E4=BA=86=E6=89=8D?= =?UTF-8?q?=E8=AE=B0=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- js/wh-cm.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/js/wh-cm.js b/js/wh-cm.js index 0fc85c3..feb3993 100644 --- a/js/wh-cm.js +++ b/js/wh-cm.js @@ -90,9 +90,19 @@ function celebrate() { var done = {}; try { done = JSON.parse(localStorage.getItem(SK) || '{}') || {}; } catch (e) {} var c = (REAL || []).filter(function (x) { return x.me && x.star && !done[x.id]; })[0]; - if (!c) return; - done[c.id] = 1; try { localStorage.setItem(SK, JSON.stringify(done)); } catch (e) {} - setTimeout(function () { if (page.classList.contains('show')) starFx(c.t, true); }, 1200); + if (!c || celebrate.on) return; + /* 等星空里的星星画出来再放(拉星星要几秒),放了才记下,没放成下次进来还会放 */ + celebrate.on = 1; var n = 0; + (function wait() { + if (++n > 40) { celebrate.on = 0; return; } + if (!page.classList.contains('show') || !page.querySelector('.wsk-st')) { setTimeout(wait, 500); return; } + setTimeout(function () { + celebrate.on = 0; + if (!page.classList.contains('show')) return; + done[c.id] = 1; try { localStorage.setItem(SK, JSON.stringify(done)); } catch (e) {} + starFx(c.t, true); + }, 1200); + })(); } function starFx(text, mine) { snap('closed');